ZFS behavior with odd-number of non-parity drives?
je
je at 8192.net
Sun Nov 18 00:51:34 UTC 2012
Given an odd number of data (non-parity) drives, how does ZFS write data
to the individual disks?
For example, a 4-drive RAIDZ or 5-drive RAIDZ2 would use three drives
for data and two for parity when writing. Since the recordsize is a
power of two (and no power of two is evenly divisible by three), it is
impossible to write a full sector (be it a 512b or 4k sector) of data to
each data drive.
In this case, what does ZFS do? Will it write recordsize/3 bytes of data
to each drive, leaving the drive to do a read/modify/write operation? Or
will ZFS round the write up to the nearest drive sector size and "waste"
the extra bytes?
I see the best practice for RAIDZ is to use an odd number of drives, and
for RAIDZ2 an even number, but I am curious as to the behavior of ZFS in
these sub-optimal conditions.
John
More information about the freebsd-fs
mailing list