Adding Disks to a ZFS Pool

From 45 Drives Technical Information Wiki
Jump to: navigation, search

Can I Add More Drives To My Pool?

From the FreeBSD documentation [1]:

A zpool is made up of one or more vdevs, which themselves can be a single disk or a group of disks, in the case of a RAID transform. When multiple vdevs are used, ZFS spreads data across the vdevs to increase performance and maximize usable space.

Therefore to add more space into your zpool, you don't technically just add a new disk(s) you have to add a whole new VDEV.

Depending on your initial pool configuration this can be painless, the trick with adding space to your zpool is to plan ahead. If you know you want add more disks down the road, arrange your pool in such a way you can add the needed amount space with ease.

If you made a 35 disk RAIDZ2 (1VDEV of 35 disks) to add more capacity to this pool your new VDEV has to be the same size, therefore you would need to add 35 more disks, resulting in 2 VDEVs of 35 disks for a total of a 70 disk RAIDZ2.

However, if you arranged your drives so you had multiple smaller VDEVs, it would much easier to add more disks into the system.For example instead of the 1 VDEV of 35 disks mentioned above, you have 5 VDEVs of 7 drives. Same amount of disks, just a different configuration allowing you to only have to add 7 more drives to extend your pool.

In the case of a 20 disk RAID 10 (stripe of mirrors) you have 10VDEVS of 2 disks. Therefore to add more drives you only need to add them in groups of 2.


Examples

RAIDZ2

Here we have a 20 disk RAIDZ2 (2 VDEVs of 10 drives)

Adddisk freenas 1.png

Using the remaining 10 disks in the system we are going to add a third RAIDZ2 VDEV.

Open the volume manager, select the volume you want to extend, and layout the drives so that it matches your current VDEVs. Don't worry about breaking anything by making a mistake here, FreeNAS will prompt you if you try do something it doesn't like.

Addinddrive freenas 2.png

If all goes well you should now see your third VDEV under "Volume Status"

Adddisk freenas 3.png

RAID10

Here we have a 20 disk RAID10 (10 VDEVs of 2 drives). Note that ZFS automatically stripes data across all VDEVs, therefore building a bunch of 2 disk mirrors in one pool will result in a RAID10 configuration.

Addisk freenas 4.png

Using the remaining 10 disks in the system we are going to add 5 more mirrored VDEVs.

Open the volume manager, select the volume you want to extend, and layout the drives so that it matches your current VDEVs. Don't worry about breaking anything by making a mistake here, FreeNAS will prompt you if you try do something it doesn't like.

Adddisk freenas 5.png

If all goes well you should now see your 5 new VDEVs under "Volume Status"

Adddisk freeans 6.png