RAID (Redundant Array of Inexpensive Disks) is the combining of multiple disks to mimic a single hardware storage device. Depending on the type, or “level”, RAID increases performance, capacity, and fault tolerance in some combination. So, what is RAID 6?
What is RAID 6?
RAID 6, which requires at least four drives, is a close cousin to RAID 5 in that data and parity info is striped across all the disks in the array. However, RAID 6 distributes more parity–two blocks for every block of data, as opposed to RAID 5’s one. Parity blocks always reside on a different disk than the data. With dual parity, the second parity block resides on yet another disk.
RAID 6 can withstand the loss of two drives and keep on ticking, where RAID 5 can tolerate only a single drive failure.
What is Parity Info?
Parity information at its most basic level is a bit (binary 1 or 0) resulting from an XOR (Exclusive OR) operation between two data bits. If both data bits are 1, or both are 0, then the resulting parity bit is 0. If the bits don’t match then the resulting parity bit will be 1.
Why XOR? Palindromic operation. If either of the original bits go missing, performing XOR on the remaining data bit and the previously generated parity bit results in the original value of the missing bit. E.g.,
- Create parity bit: 1 XOR 1 = 0
- Restore data bit: 1 (surviving data bit) XOR 0 (parity bit) = 1
- Create parity bit: 1 XOR 0= 1
- Restore data bit: 1 (surviving data bit) XOR 1 (parity bit) = 0
- Restore data bit: 0 (surviving data bit) XOR 1 (parity bit) = 1
The double parity in RAID 6 adds a rather complicated Reed-Solomon equation to the mix. The main parity is the letter “p” in the image above, while the second set of parity info is the “q”.
The Upside
RAID 6 offers good performance and very good data safety:
- You can lose up to two disks and it will still operate
- Total array capacity increases with each additional disk though you lose the equivalent of two drives due to parity info. 16TB * 5 disks – 2 disks = 48TB
- Each new disk increases the number of available data lanes. Multiple pipes result in slightly slower random access times, but increased sustained read and write speed
Speed only increases with new drives up to the limit the the transport technology involved. Beyond that, adding new drives only increases capacity. If you do lose two drives, back up immediately if necessary and consider taking the setup offline.
The Downside
RAID 6 is safer than RAID 5, but not fail-safe:
- If up to two drives fail, the array will still be available, though at reduced speed until the drives are replaced and the array is rebuilt
- The array fails if a third drive failure occurs before the array is rebuilt
A third drive failure before the array can be rebuilt is exceedingly rare, however, Murphy will have his way. As with all important data, there should be three copies: original, a copy, and a copy of the copy. RAID can be considered the first and second, but you need a third.
When to Use RAID 6
RAID 6 should be used when data safety and availability are more important than speed or capacity, but you don’t want to forego the latter benefits altogether. You can use RAID 6 with only four drives, however, RAID 10 is a faster option at that level. Most RAID 6 implementations will use 5 drives or more.