A few years ago I was asked how RAID5 was able to re-create data when a drive failed. I created a spreadsheet to show visually how it was done. I've stumbled on that spreadsheet again, so I thought I'd put it here in case anyone else would like to know just how RAID-5 works.
RAID-5 protects data by using an amount of storage equivalent to one physical disk in your array to write the parity or checksum information of the data on the rest of the storage area. Parity is calculated using XOR. Hardware RAID controllers calculate parity when writes are made to the array, and the read from the parity to reconstruct the data of a failed drive on failure. Software RAID controllers use CPU time to do parity calculation which can incur a significant amount of overhead.
The formula for parity of one stripe of data (one row in the table above) is:
P1 = (((D1 XOR D2) XOR D3))
Download the "How Raid Works" spreadsheet which implements RAID-5 in a group of cells.
Spreadsheet: How Raid5 Works - [HERE]
Note: Spreadsheet requires Gnumeric [LINK].
0 comments:
Post a Comment