Parity is essentially using math to calculate and store a summary of data for each data sector onto a parity sector of a drive that isn’t storing data for that sector. If a drive fails, the controller can use what is essentially an algebraic equation to calculate the missing data -- or parity if that is what is missing -- to use to replace the data (slowly) until the failed drive is replaced and rebuilt. You can imagine it as a gigantic, but simple sudoku puzzle.

Raid5.png

RAID5 is the most common version of this. If you have five drives, one sector might be used for data on drives 1,2,3,4 and parity on 5, then the next sector might have parity on 2 with data on 1,3,4,5 and so on. Like mirroring, you need to buy extra drives (the best ratio is 7 data to 1 parity) and it’s slower, but less expensive than mirroring. Something like a database that is constantly being updated will run noticeably slower on RAID5, but the cost saving can frequently justify it. If a second drive fails before you replace the first, all your data is lost.

Raid6.png

On problem noted while RAID5 rose in popularity was that rebuilding a failed drive placed a great deal of additional strain on the remaining drives. If they were old enough (5+ years), the odds of another drive failing before you rebuilt the first failed drive were significant. RAID6 was created to mitigate this risk. It is simply a second parity stripe -- so using our five drive example above, one sector might have data on 1,2,3 and parity on 4,5 and then the next sector might have parity on 2,4 with data on 1,3,5. The cost is an additional drive for added security.

A limitation of RAID5 & RAID6 is that all drives have to be the same size (or if larger, the additional space is wasted) and the array is fixed upon creation -- that is if you create a five-drive array, you can’t just add a sixth drive without wiping out everything and starting over. Dedicated parity drives bypass this limitation allowing you to use a variety of drives and add more later if needed. The most common implementations of this are the UnRAID OS and Drobo storage appliances. These configurations tend to be slower, but the flexibility is very appealing.