Skip to contentSkip to conversation

raid6 and parity calculations

DISCUSSION Michael Sallaway 2 participants 2 messages Sep 15, 2010 MD RAID

lore
Share & tools
lore
#0 lore raw
Quoted 8 lines

-------Original Message-------
From: Neil Brown <[email protected]>
To: Michael Sallaway <[email protected]>
Cc: [email protected]
Subject: Re: raid6 and parity calculations
Sent: 15 Sep '10 10:26

Quoted 9 lines

It is best not to think to think to much about chunks.  Think about strips (not stripes).
A strip is a set of blocks, one per device each at the same offset. Think of page sizes blocks/strips.
Each strip has a P block and a Q block and a bunch of data blocks.  Which is P and which is Q and which each data block is a function of the offset, the layout and the chunk size.  Once you have used the chunksize to perform that calculation, don't think about chunks any more - just blocks and strips.

Aah, perfect -- that makes sense, thanks for that.

As a sort-of follow up question, would anyone know if the data size of a Q calculation affects the result at all? eg. if I do a 64kb Q calculation on 10 drives of data, would that be the same as doing 16x 4kb Q calculations on sequential blocks of the same data, then concatenating it together? (I can't remember what that operation property is called....?)

I've been reading the maths of RAID6 PDF (http://kernel.org/pub/linux/kernel/people/hpa/raid6.pdf), but I'm a bit too rusty to understand Galois fields, and if the data size matters. I presume the data ordering is also critical for a Q calculation, correct? (eg. drives have to be d0 -> d10 in order, not just random).

And, in contrast, for the P calculations, data size and input order makes no difference, correct? (since it's just a simple bitwise XOR of all the inputs).

Quoted 2 lines

Ouch... good luck.

Thanks! I'm the only one to blame, though -- it happened in the month between "getting the new system set up" and "setting up backups for the new system". So it's the only copy of the data.... whoops. :-)

Thanks for the help/advice!

Cheers,
Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 6 lines · Michael Sallaway

As a sort-of follow up question, would anyone know if the data size of a Q calculation affects the result at all? eg. if I do a 64kb Q calculation on 10 drives of data, would that be the same as doing 16x 4kb Q calculations on sequential blocks of the same data, then concatenating it together? (I can't remember what that operation property is called....?)

Yes, the result would be the same. In fact, byte n of Q depends only on byte n of the 10/16 data drives.

Quoted 6 lines

I've been reading the maths of RAID6 PDF
(http://kernel.org/pub/linux/kernel/people/hpa/raid6.pdf), but I'm a bit too rusty to understand Galois fields, and if the data size matters. I presume the data ordering is also critical for a Q calculation, correct? (eg. drives have to be d0 -> d10 in order, not just random).

Right, order matters.

Quoted 3 lines

And, in contrast, for the P calculations, data size and input order makes no difference, correct? (since it's just a simple bitwise XOR of all the inputs).

Also correct.

Andre

Signature · 1 line
The only person who always got his work done by Friday was Robinson Crusoe