I'm learning about ZFS and wondering if it is recommended to use whole physical disks or some smaller partitions for VDEVs?

With e.g. mdadm my understanding is that it is recommended to use smaller partitions, so that replacing failed drives with new ones is much more likely to succeed. Different drives of different manufacturers might have little size differences, which might lead to new drives not being usable for replacement. This sounds like a good approach for ZFS as well.


It depends on your disks and needs:

  • If you always procure the same models (say, with long-term support contracts or by choosing yourself), it does not matter much and you can save yourself the hassle of partitioning. The same applies if your size needs are low, so you replace your 500GB with the currently lowest offer of 1 TB without resizing the pool.
  • If you have a variety of different disks from different sources, need to replace with what's available now and/or need to accept slightly inferior conditions (some sectors are destroyed, but the drive functions well and you have enough redundancy anyway), you are more flexible and future-proof with removing a few megabytes from each drive and creating equally-sized partitions.

My personal recommendation:

If you can manage/automate the partitioning step so that it is no additional burden (might already be done by the operating system) when replacing drives, go for the single slightly reduced partition. If money is no objective, you don't need to, because you then just order the exact same drive or a drive with 1TB more of space.

  • Any suggestions on how much space should be left unused in case of a partition? I'm using 1 TB disks, so thought about something like 250 MB. Should be enough to deal with size differences of different vendors/products? – Thorsten Schöning Jul 5 '17 at 12:31
  • 1
    @ThorstenSchöning Usually much lower, in the range of a few megabytes. Normally, the differences between disks are some bytes or kilobytes, so you do not need much. Of course, it is also not much difference between losing 10 or losing 100 megabytes today, so you can do both. On much inferior media (SD cards) it seems they range in the low 100s of MB (boundarydevices.com/how-big-is-your-sd-card). Largest difference I have seen was exactly 200 MB on a 16 GB SLC SSD (which was lost after some time, so I assume some sectors were faulty). – user121391 Jul 5 '17 at 12:48
  • I might have to add to my previous comment: in this case, the problem was quite small, because zfs send/recv with <16GB is pretty fast, so I could just swap the mirrored devices and create a new pool with the smaller size as baseline, losing 200 MB of usable space automatically. This might not be so easy with large drives, so a more generous buffer might be useful. – user121391 Jul 5 '17 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.