Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Nov 2012 16:42:48 -0800
From:      je <je@8192.net>
To:        freebsd-fs@freebsd.org
Subject:   ZFS behavior with odd-number of non-parity drives?
Message-ID:  <50A82F08.8010908@8192.net>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50A82F08.8010908>