Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Hardware - Troubleshooting and Discussion > Consumer Hardware & Components > RAID 5 question?

RAID 5 question?
Thread Tools
Laurence
Mac Enthusiast
Join Date: Mar 1999
Location: Portland, Oregon, United States
Status: Offline
Reply With Quote
Dec 14, 2007, 12:57 AM
 
Does anyone have an explanation or even a good link as to how RAID5 works? I know that the array has the total space of N-1 drives assuming all drives are equal size. How does this really work? It seems to me that if I have 11 1TB drives making a 10TB array that there can't really be enough space to back up all the data on one drive. If that one drive fails, how is the data regenerated from the parity information? as I understand parity (from the days of 8N1 modem connections) parity can only tell you that every bit is correct -OR- some bits are wrong. What happens when multiple random bits are wrong. Can the parity tell you enough information to completely recreate the data? If this is the case it seems that no space at all would be required for parity on an N-1 array as N approaches infinity. I realize that this is unrealistic in that we don't have infinite drives to test, but I can imagine that even with a few hundred drives something has to break down.
--Laurence
     
OreoCookie
Moderator
Join Date: May 2001
Location: Hilbert space
Status: Offline
Reply With Quote
Dec 14, 2007, 03:57 AM
 
Have a look here. They also explain all other RAID levels.
I don't suffer from insanity, I enjoy every minute of it.
     
Laurence  (op)
Mac Enthusiast
Join Date: Mar 1999
Location: Portland, Oregon, United States
Status: Offline
Reply With Quote
Dec 23, 2007, 11:54 PM
 
Thanks for the quick reply, but I actually understand the RAID levels reasonably well... What I don't understand is how, if one drive is missing in a RAID 5 array you can take the "parity" information and recreate the original file. If the parity information is, by design, smaller than the original data it would seem to violate some mathematical law. If the parity is enough information to recreate the original data then you could just store the parity data and not store the original files at all? If you repeat this process indefinitely you would have the "perfect" compression algorithm where you could compress anything indefinitely which is obviously impossible. I was looking for some information on the math behind the RAID 5 restoration process.
--Laurence
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Dec 24, 2007, 03:11 AM
 
You lose 1 drive capacity to parity, so there's no mathematical violation. With four 1TB drives in a RAID5 array, you can store up to 3TB. If you lose 1 drive, you now have 2TB of data and 1TB of parity, from which you can reconstruct your 3TB of data.

If I recall correctly, RAID5 is XOR based. Say you have two data bytes, A and B, stored on separate disks. Now calculate A XOR B and store it as C on a third disk. What happens when you lose a disk?
Lose the disk with A on it: calculate B XOR C and you have A back.
Lose the disk with B on it: calculate A XOR C and you have B back.
Lose the disk with C on it: calculate A XOR B and you have C back.

At 11PM I can't remember or figure out how they do it with more than 3 disks, but it's the same idea.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:07 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,