Storage

RAID 6

A RAID level using double distributed parity. Usable capacity is (N - 2) x drive size. It tolerates two simultaneous drive failures, making it safer for large arrays with long rebuild times.

Two parity blocks in every stripe

RAID 6 adds a second parity block to each stripe and rotates both across the drives. It needs at least four drives and gives up two drives' worth of space. The first parity is plain XOR, as in RAID 5. The second uses a different code, classically Reed-Solomon, so the two blocks give two independent equations and the array can solve for two missing blocks at once.

Six 8 TB drives give 32 TB usable from 48 TB raw. Parity takes 33% of the space, against 17% for RAID 5 on the same six drives. That extra drive of parity is what pays for the second failure you can survive. At four drives RAID 6 and RAID 10 give the same space, 16 TB from four 8 TB drives, so the choice there comes down to how each one handles failures and writes.

What the second parity covers

With one drive dead, a RAID 6 array still has one parity left. That's enough to rebuild a stripe even when a second drive fails or a sector can't be read. RAID 5 has no such margin. The case people worry about most is a bad sector found partway through a rebuild, and RAID 6 just reconstructs that block from the remaining parity and keeps going. It can't cover everything. With two drives down, the next bad sector is fatal again.

The reads are big. Rebuilding one drive in an eight drive array of 20 TB drives reads 140 TB from the survivors, and replacing a single 20 TB drive takes at best 35 hours at the RAID Calculator's modeled hard drive speed.

Now take six 8 TB drives, which read 40 TB in a rebuild. At a spec rate of 1 in 10^14 bits, the chance of at least one unrecoverable read error in that read is at most about 96%, and at 1 in 10^15 bits it's at most about 27%. Those are ceilings, not forecasts. With RAID 6, a single bad sector is covered instead of fatal.

What RAID 6 costs on writes

A small write has to update the data block and both parity blocks. That's three reads and three writes, six disk operations against four for RAID 5. Reads from a healthy array don't pay this, and neither do writes that fill a whole stripe, so a media NAS rarely feels it. A database or a busy virtual machine host does.

RAID 6, RAID-Z2 or RAID 10

ZFS's RAID-Z2 is double parity too, and the capacity math matches: four 8 TB drives give 16 TB, the same as RAID 6. RAID-Z2 needs only three drives as a minimum, and it avoids the write hole.

RAID 10 is the other way to survive failures. On eight 8 TB drives, RAID 6 gives 48 TB and RAID 10 gives 32 TB. RAID 6 survives any two failures. RAID 10 guarantees one, and a second is survivable only when it lands in a different mirror pair, which happens 85.7% of the time for a random second failure. In return, RAID 10 writes without parity and rebuilds by copying a single drive. Pick RAID 6 for capacity and archives, and RAID 10 for write-heavy work.

Work it out yourselfOpen the RAID Calculator

Sources

Back to the glossary