RAID 6
Raid 6 - Striping with dual rotating parity blocks
RAID 6 is not a very common, but is used on servers with large numbers of drives in the array. Combines the advantages of RAID 5 but with an extra parity block in each stripe. Data is striped in blocks (A1, A2 and A3 in the diagram below) and two additional parity blocks are written (Ap + Aq). For each new stripe the parity blocks 'rotate' to the next drives in the sequence.
Advantages of RAID 6
- The second parity block means two drives in the array can fail without data loss.
- Reasonably fast data reads and writes
- System rebuilds automatically if hot spares included in system.
Even though there is extra redundancy in RAID 6, regular backups are very important..
Disadvantages of RAID 6
- More expensive than RAID 0 and RAID 5
- Write cycles take slightly longer than RAID 5 because of the extra parity block
- Reduced storage space as 2 drives in each array are used for redundancy
Most RAID 6 systems allow for 'Hot Spares' - this allows 1 or more spare drives to be placed on the RAID controller, so that in the case of drive failure. The Hot spare will replace the failed drive and will rebuild itself with the data from the remaining good drives.
The parity calculations for RAID 6
Parity is calculated by XOR'ing each value with the next. The final value is stored for each byte in the two parity blocks for the array. For example:
If the three values are (in decimal), 25, 50, 99 then we calculate 25 XOR 50 XOR 99 = 72 so for this byte 72 would be stored in the parity block. If a drive fails, then the missing value can be calculated by the remaining values. Lets say that the first drive fails. We XOR the following values to get the missing one.
50 XOR 99 XOR 72 = 25 we can now write this value to a 'hot spare' and completely rebuild the array (note that with RAID 6, only one parity value is taken into account).