On Thu, Jan 8, 2009 at 10:01, Orvar Korvar
<knatte_fnatte_tja...@yahoo.com> wrote:
> Thank you. How does raidz2 compare to raid-2? Safer? Less safe?
Raid-2 is much less used, for one, uses many more disks for parity,
for two, and is much slower in any application I can think of.
Suppose you have 11 100G disks.  Raid-2 would use 7 for data and 4 for
parity, total capacity 700G, and would be able to recover from any
single bit flips per data row (e.g., if any disk were lost or
corrupted (!), it could recover its contents).  This is not done using
checksums, but rather ECC.  One could implement checksums on top of
this, I suppose.  A major downside of raid-2 is that "efficient" use
of space only happens when the raid groups are of size 2**k-1 for some
integer k; this is because the Hamming code includes parity bits at
certain intervals (see [1]).

Raidz2, on the other hand, would take your 11 100G disks and use 9 for
data and 2 for parity, and put checksums on blocks.  This means that
recovering any two corrupt or missing disks (as opposed to one with
raid-2) is possible; with any two pieces of a block potentially
damaged, one can calculate all the possibilities for what the block
could have been before damage and accept the one whose calculated
checksum matches the stored one.  Thus, raidz2 is safer and more
storage-efficient than raid-2.

This is all mostly academic, as nobody uses raid-2.  It's only as safe
as raidz (can repair one error, or detect two) and space efficiency
for normal-sized arrays is fairly atrocious.  Use raidz{,2} and forget
about it.

Will

[1]: http://en.wikipedia.org/wiki/Hamming_code#General_algorithm
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to