RAID 6: Stripe Set With Double Redundancy
If you remember how we calculated single parity across a given set of data for a RAID 5 array, you already know there is a solution for double redundancy. This involves repeating the process of creating an XOR to give you a second parity bit which, of course, allows you to lose two hard drives with a RAID 6 array before you will physically lose data.
How RAID Redundancy Works
RAID 5 or RAID 6 terminology has become part of everyday IT vocabulary, but most people don’t actually know more than the basic principles. First, parity information is calculated for a given amount of data. Here is a very simple example that is based on six pieces of information, which corresponds to a RAID 5 array with six hard drives. Think of 11010 being binary information, of which each bit gets stored on one of the six hard drives. If you want to generate information that allows you to recreate all of the data, the easiest way to do that is to do a binary XOR calculation, where 0+0=0, 0+1=1, 1+0=1 and 1+1=0. This is our definition for even parity, which means that the parity bit will be 0 in case the total of 1s and 0s is even, and it will be 1 if it is not. Using our information block 11010, we get:
1+1=0, 0+0=0, 0+1=1, 1+0=1. Three 1s and two 0s are uneven, thus 1.
The sixth element, hence the parity information, would be 1. So, the entire information now is 110101. The controller now goes ahead and stores the individual bits on the individual hard drives: The first drive stores 1, the second drive stores 1, the third stores 0, etc. If one piece of this six bit information gets lost, all you have to do is run an XOR calculation across the remaining elements to recalculate the missing element. Let’s say the fourth hard drive, carrying 1, gets lost. You’d now have 110x01 left. Let’s compare the remaining values to each other:
1+1=0, 0+0=0, 0+0=0, 0+1=1
This is the result we need to recreate the bit stripe. A RAID 6 with double redundancy simply adds additional parity information across the RAID 5 stripe, which already carries a parity bit.
The computing power required to do the calculations is considerable, especially for a RAID 6 array with two defective drives, so be sure you’ve got plenty of CPU horsepower or a dedicated XOR offload engine before you setup a parity RAID array. One problem with parity implementations is that RAID levels only define what to do, but not how to do it. The so-called RAID signature is different with almost every manufacturer. Do you run even or uneven parity? Where do you store the parity bit? This is the main reason why recovery of RAID arrays is an expensive affair; you need to know or determine the particular implementation.