
How RAID-6 dual parity calculation works - c0ff
http://igoro.com/archive/how-raid-6-dual-parity-calculation-works/
======
sp332
Here's someone doing the math to generate matrices for higher amounts of
parity:
[http://www.spinics.net/lists/raid/msg44948.html](http://www.spinics.net/lists/raid/msg44948.html)

------
signa11
i would rather go with this :
[https://www.kernel.org/pub/linux/kernel/people/hpa/raid6.pdf](https://www.kernel.org/pub/linux/kernel/people/hpa/raid6.pdf)
for much better in depth coverage...

~~~
level
> This article is for computer engineers who would like to have a high-level
> understanding of how the dual parity calculation works, without diving into
> all of the mathematical details.

That is more in depth, but is a lot more math heavy, which the author
specifically states they are trying to avoid.

------
shanemhansen
I come from a different math background, and it always surprises me people
don't explain erasure encodings in terms of polynomials.

We all know that a polynomial of degree n is basically defined by n points. So
a line is defined by 2 points.

If I need to encode the 2 pieces of info [a,b] I can just generate a
polynomial ax+b and sample it at 2 points to recover the info. If I sample it
at 3 points I can lose any one point and still recover [a,b]. The concept
generalizes to higher dimensions and discrete values.

afaik that's basically it.

------
dmiladinov
From the article:

> This article is for computer engineers who would like to have a high-level
> understanding of how the dual parity calculation works, without diving into
> all of the mathematical details.

I believe that is the value proposition for reading: gaining an understanding
of RAID-6 parity calculation while glossing over the math-y bits.

------
oofabz
Why does it need separate parity formulas? It would be easier to put the same
simple xor in both parity blocks.

~~~
aYiZtr
Suppose you have four disks and lose two. Consider a set of blocks where you
lost two data blocks and still have two parity blocks. The parity blocks would
be identical and you would not be able to recover data for either of the two
missing data blocks.

