On Wed, Oct 31, 2012 at 6:47 PM, Matthew Ahrens <mahr...@delphix.com> wrote:
> On Thu, Oct 25, 2012 at 2:25 AM, Jim Klimov <jimkli...@cos.ru> wrote: > >> Hello all, >> >> I was describing how raidzN works recently, and got myself wondering: >> does zpool scrub verify all the parity sectors and the mirror halves? >> > > Yes. The ZIO_FLAG_SCRUB instructs the raidz or mirror vdev to read and > verify all parts of the blocks (parity sectors and mirror copies). > Good to know. > The math for RAID-Z is described in detail in the comments of > vdev_raidz.c. If there is a checksum error, we reconstitue the data by > trying all possible combinations of N incorrect sectors (N being the number > of parity disks) -- see vdev_raidz_combrec(). > Google gave me this result: http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/zfs/vdev_raidz.c It had me slightly concerned because it does the LFSR on single bytes, though for mainly theoretical reasons - for a raidz3 of 258 devices (ill-advised to say the least), using single bytes in the LSFR wouldn't allow the cycle to be long enough to have the parity protect against two specific failures. However, I tested whether zpool create checks for this by creating 300 100MB files and attempting to make them into a raidz3 pool, and got this: $ zpool create -n -o cachefile=none testlargeraidz raidz3 `pwd`/* invalid vdev specification: raidz3 supports no more than 255 devices Same story for raidz and raidz2. So, looks like they already thought of this too. Tim
_______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss