RAID RECOVERY LABS - MASS STORAGE DATA RECOVERY
 

RAID ERROR CORRECTION CODE


Error-correction codes


For RAID 2 through 6 an error-correcting code is used to provide redundancy of the data.



For RAID 2, a Hamming code is used. For this level, extra disks are needed to store the error-correcting bits ("check disks" according to Patterson, et al).


RAID 3, 4 and 5 use standard parity bits by using the XOR logical function. For example, given the following three bytes:

  • A1 = 00000111
  • A2 = 00000101
  • A3 = 00000000

Taking the XOR of all of these yields:


 

In terms of parity, the parity byte creates even parity. This means that the sum of 1s for each bit position yields an even number. In this example, the 2nd bit position from the right has one 1 while 1st and 3rd have two 1s; including the parity yields two (even) parity for these three bit positions.


Using such a parity scheme helps the RAID detect data integrity defects, as well as increase data resiliency with respect to individual drive failure. If any one drive becomes unreadable, that drive's data can be perfectly reconstructed from the data on all the other drives. For example, say the disk containing A2 is lost leaving A1, A3, and Ap to reconstruct A2. This can be done by using the XOR operation again:


Using such a parity scheme helps the RAID detect data integrity defects, as well as increase data resiliency with respect to individual drive failure. If any one drive becomes unreadable, that drive's data can be perfectly reconstructed from the data on all the other drives. For example, say the disk containing A2 is lost leaving A1, A3, and Ap to reconstruct A2. This can be done by using the XOR operation again:


 

As we see, the original value of A2 has been correctly inferred from the three known values. This process can then be repeated for the remainder of the data.


The above example illustrates one parity drive and three data drives. This scheme will work for any number of data drives per parity drive, though running many data drives per parity drive increases the likelihood of two or more drives failing concurrently. Also, most disk drives operate on blocks of data, rather than individual bytes, but the basic bitwise XOR scheme functions the same for any length of bits.




Home | Recovery Services | Testimonials | Release Form | Contact | About us |
2007 RAID RECOVERY LABS, Inc. All Rights Reserved.