Using exotic setups to maximize capacity (when using different sized disks) in ZFS raidz

mirrorraidzzfszfsonlinux

I have 2 x 4TB disks and 3 x 6TB disk which I want use with ZFS. My objective is to maximise the usable storage space whilst allowing for a single disk failure.

Ideally a raidz setup would be used however from my research, different size drives cause the larger drives to be under utilized. That is, only 4TB out of 6TB would be used on the larger drives.

Is it possible to stripe (raid 0) the following:

  • two 4TB in a mirror (raid 1) configuration
  • three 6TB disks in a raidz (raid 5) configuration

Alternatively, could the two 4TB be striped and then the stripe used in a raidz configuration with the 6TB drives? That is:

  • Stripe the two 4TB drives
  • Raidz the 3 x 6TB and striped 4TB disk

Best Answer

For the love of all things good in the world, do not use this setup in a situation where your data is more important than /dev/null - it's simply an academic exercise of how you could and should not do it.

You probably will lose your data with this topology. It will also perform poorly as coalesced sequential operations would turn into random IO.

What you would do is the following:

Each drive would be partitioned into 2TB segments, the 4TB drives would have two partitions, and the 6TB drives would be partitioned into three partitions. Yes, ZFS does accept partitions as part of a ZPool - it works though not recommended.

From there, you would setup a RAIDZ3 triple parity across all 13 partitions. This would provide you single disk resiliency, as you could lose 3 "disks" (aka 1 6TB disk) and still keep going without issue.

You would have a 20TB ZPool with this setup. This technically is as efficient as you can get with the ability to survive a physical disk failure. As I said before, just because the math works, do not do it.

Keep in mind that when you replace a disk, you would have to make an identical partition table as the failed one, so keep your partitioning commands safe and use the same sector sized disks.