Parity question


Recommended Posts

I understand parity information is only stored on the parity drive. My question, if a drive fails and you don't know about it how long of a period do you have to recover the contents of that drive.

 

For example, say HD1 fails in my box and i don't realize this for a month, during that period of time assume i've made read/writes to the other 9 disks in the box (thus modifying the parity data on the parity drive). Can I stick a replacement HD for HD1 and assume the parity drive can still recover this data? I doubt this is based on a period of time but rather by the amount of I/O the Parity drive makes since the failure.

 

Sorry if this has been asked before!

 

Any help is much appreciated!

 

 

Link to comment

I understand parity information is only stored on the parity drive. My question, if a drive fails and you don't know about it how long of a period do you have to recover the contents of that drive.

 

For example, say HD1 fails in my box and i don't realize this for a month, during that period of time assume i've made read/writes to the other 9 disks in the box (thus modifying the parity data on the parity drive). Can I stick a replacement HD for HD1 and assume the parity drive can still recover this data? I doubt this is based on a period of time but rather by the amount of I/O the Parity drive makes since the failure.

 

Sorry if this has been asked before!

 

Any help is much appreciated!

 

 

Actually, you can any single drive fail, including the parity drive and still use ALL the data drives as usual, although with some loss of performance when reading the "failed" drive.

 

You do not have any time limit.  The limit is in the time it will take before a second drive will concurrently fail.  (at that time you'll lose the contents of the two failed drives)

 

For that reason, it is in your best interest to replace a failed drive as soon as you notice it.   You can however still read and write to the failed drive, odds are you might never notice it if you do not look at the management console or set up an e-mail alert to let you know when it has failed.

 

Joe L.

Link to comment

Thank you guys, this is great information! It kinda blows my mind how this works, I figured once the parity drive is written to after a failed drive than the parity drive will have changed, thus making accurate recovery impossible. The only explanation I can think of to explain the way this works is if the parity drive makes some sort of independent allocation of space for each and every drive on the unRAID. Which makes me wonder how the hell it's capable of providing redundancy for up to 40TB's of space  across 20 drives on a single 2 TB drive.

 

Link to comment

Thank you guys, this is great information! It kinda blows my mind how this works, I figured once the parity drive is written to after a failed drive than the parity drive will have changed, thus making accurate recovery impossible. The only explanation I can think of to explain the way this works is if the parity drive makes some sort of independent allocation of space for each and every drive on the unRAID. Which makes me wonder how the hell it's capable of providing redundancy for up to 40TB's of space  across 20 drives on a single 2 TB drive.

 

It doesn't.  It, in combination with ALL the other drives can re-construct the contents of a missing/failed drive.

 

It holds, for each bit position on the data drives, a calculation.

 

Let's pretend you have 20 drives, and 1 parity drive.  For a given "bit" position we can either have a 0 or a 1.

 

Let's pretend you have

data drives                    parity drive

00001100001000010000   0

In the parity drive we store a value so we will always have an EVEN number of "1s" across the entire bit position.  In this case, since there are an even number of "1s" the parity bit is a 0.

 

Let's try a different bit position, again, one bit per drive.

data drives                    parity drive

01000000001000010000   1

This time there are three data bits set to a "1" (and odd number) so we need to set parity to a "1" to make a total of 4 bits set to a "1" (Parity is always set to have an even number of "1s" across a bit position)

 

Finally, let's see if you can figure out (re-construct) the value of a missing bit

Let's try a different bit position, again, one bit per drive.

data drives                    parity drive

01000?00001000001001   0

 

Remember now, we have one bit we cannot read since the disk has failed.  Can you tell me what it would be?  (remember, there are ALWAYS an even number of bits set to a "1 when you look at all the data bits and the parity bit)

Was it a "1" o a "0"???

 

Do the same math a few trillion times, once for each bit, and you can re-construct a 2TB drive.

 

Joe L.

Link to comment

Finally, let's see if you can figure out (re-construct) the value of a missing bit

Let's try a different bit position, again, one bit per drive.

data drives                    parity drive

01000?0000100001001   0

 

Remember now, we have one bit we cannot read since the disk has failed.  Can you tell me what it would be?  (remember, there are ALWAYS an even number of bits set to a "1 when you look at all the data bits and the parity bit)

Was it a "1" o a "0"???

 

Trick question. You're missing two drives, at least going by the assumption that you have a 20+1 array. ;)

Link to comment

Finally, let's see if you can figure out (re-construct) the value of a missing bit

Let's try a different bit position, again, one bit per drive.

data drives                    parity drive

01000?0000100001001   0

 

Remember now, we have one bit we cannot read since the disk has failed.  Can you tell me what it would be?  (remember, there are ALWAYS an even number of bits set to a "1 when you look at all the data bits and the parity bit)

Was it a "1" o a "0"???

 

Trick question. You're missing two drives, at least going by the assumption that you have a 20+1 array. ;)

Not on  purpose... I fixed it.  (dumb mistake)  And now you know why you cannot re-construct two failed disks.
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.