Sub topic 13
RAID 6: surviving two drive failures
This chapter assumes you already know striping, mirroring, and parity, and that you have seen RAID 5. It covers how RAID 6 extends RAID 5 and when the extra cost is worth paying.
The working model
RAID 6 stripes data across the drives, like RAID 5. It stores two independent parity blocks per stripe instead of one. The array can lose any two drives at the same time and keep running. The minimum is four drives.
The two parity blocks are calculated differently, so they give two separate equations for each stripe. With two unknown blocks missing, the controller can solve for both. For the exam, you only need to remember the result: double parity means two-drive fault tolerance.
| Feature | RAID 5 | RAID 6 |
|---|---|---|
| Minimum drives | 3 | 4 |
| Parity blocks per stripe | 1 | 2 |
| Drive failures survived | 1 | 2 |
| Usable capacity | (n - 1) × size | (n - 2) × size |
| Write speed | Slower than reads | Slower than RAID 5 |
Why two parity blocks matter
A RAID 5 array is fragile while it rebuilds. The rebuild reads every surviving drive in full. If a second drive fails during that time, or if an unreadable sector turns up, all the data is lost. Large drives make rebuilds take hours or days, so this risk is real.
RAID 6 closes that gap. If one drive fails and a second one fails during the rebuild, the array still works.
Capacity and cost
RAID 6 gives up two drives' worth of space to parity. With four 2 TB drives, usable space is (4 - 2) × 2 = 4 TB. RAID 5 on the same drives gives 6 TB.
The overhead shrinks as you add drives. With eight 2 TB drives, RAID 6 gives 12 TB, which is 75% of the raw space. That is why RAID 6 suits larger arrays better than a four-drive one. At exactly four drives, RAID 10 also gives 4 TB, and it writes faster.
The usable_capacity function from the capacity chapter applies the same formula:
def raid6_capacity(drives, size_tb):
if drives < 4:
raise ValueError("RAID 6 needs at least 4 drives")
return (drives - 2) * size_tb
print(raid6_capacity(4, 2)) # 4
print(raid6_capacity(8, 2)) # 12Trade-offs and common mistakes
- Write penalty. Every write must update two parity blocks. Writes are slower than in RAID 5, so RAID 6 is a poor fit for write-heavy workloads on a basic controller.
- Controller load. Double parity is more work to calculate. Hardware controllers with dedicated processors handle it better than software RAID.
- Mixing up RAID 6 and RAID 10. Both can survive two failures in some cases, but RAID 10 only survives two if they hit different mirror pairs. RAID 6 survives any two.
- Treating it as a backup. RAID 6 does not protect against deletion, malware, fire, or controller failure.
Exercise
A server has six 4 TB drives in RAID 6. What is the usable capacity, and how many drives can fail before data is lost?
Show answer
Usable capacity is (6 - 2) × 4 = 16 TB. Any two drives can fail without data loss. A third failure loses the data.
Exercise
Why is RAID 6 safer than RAID 5 for an array built from very large drives?
Show answer
Large drives take a long time to rebuild. During a RAID 5 rebuild, a second failure or unreadable sector causes total data loss. RAID 6 has a second parity block, so it can survive that second failure.