Can zfs use mixed vdev mirror sizes

zfs

can zfs do the following?

10 x 3TB disks as 5 mirrored vdevs plus 2 x 2TB as a mirror vdev.

I am looking to use those two 2TB disks that I have for a total of 17TB, and then upgrade down the track.

For example, could I later upgrade those 2x 2TB disks to 2x 6TB?

Best Answer

10 x 3TB disks as 5 mirrored vdevs plus 2 x 2TB as a mirror vdev.

You have the following options:

  1. 1 pool (12 x 2), usable space (6 x 2) = 12 TB
  2. 1 pool with (10 x 3) + (2 x 2), usable space (5 x 3) + (1 x 2) = 17 TB
  3. 2 pools with (10 x 3) and (2 x 2), usable space 15 and 2 TB separately

Option 1 seems to be inferior to 2, but if you replace the two small disks and have autoexpand = on set on the pool, it will automatically grow to (12 x 3), resulting in 18 TB, vs. 15 + 3 TB usable for option 2. The size will be the same, but your pool will be faster, more balanced and more fault-tolerant than option 2.

For example, could I later upgrade those 2x 2TB disks to 2x 6TB?

Yes, you could. That would give you 15 + 6 TB = 21 TB, but it would be slower than an equal configuration.

  • You can upgrade each disk of each vdev separately - the whole vdev always has the size of the smallest disk in it. For mirrors this means that both disks must be upgraded before additional space can be used.

  • You can also add and remove disks to and from mirror vdevs, but this only increases/decreases reliability and fault-tolerance, usable space is not changed.

  • Finally, you can always add more vdevs of any type and size to your pool (although similar sizes/types are recommended for performance reasons), so your pool size will grow (span, essentially RAID 0). Be careful though, as you cannot remove vdevs after adding them without destroying the pool. Your pool will fail if any vdev inside fails critically, along with all data in it.