One disk gives you one disk's capacity, one disk's speed, and one disk's chance of ruining your week when it dies. RAID — a Redundant Array of Independent Disks — is the idea that several cheap drives, coordinated by the block layer or a controller, can be made to look like a single volume that is faster, bigger, or more reliable than any one of them. The catch, and the whole subject, is that you cannot maximise all three at once. RAID is a family of explicit trade-offs between capacity, performance, and reliability.
The two primitive tricks are striping (spread data across disks so they work in parallel) and redundancy (keep extra copies or parity so a failure loses nothing). Every RAID level is a different recipe mixing these two — and the interesting engineering lives in the parity schemes, the "small write" problem they create, and the terrifying arithmetic of rebuild time when a disk in a large array finally fails.
Six levels cover almost everything you meet in practice. Read this table as "what am I buying, and what am
I paying?" for an array of
| Level | Technique | Usable capacity | Tolerates | Notes |
|---|---|---|---|---|
| RAID 0 | striping only | 0 failures | fastest, zero safety — one death loses all | |
| RAID 1 | mirroring | 1 failure | simple, halves capacity | |
| RAID 4 | striping + dedicated parity disk | 1 failure | parity disk is a write bottleneck | |
| RAID 5 | striping + distributed parity | 1 failure | the workhorse; small-write penalty | |
| RAID 6 | striping + two parities | 2 failures | survives a failure during rebuild | |
| RAID 10 | mirror, then stripe | ≥1 (often more) | fast + safe, expensive |
The elegant trick behind RAID 4/5/6 is parity via XOR. For a stripe of data blocks
This is the whole reliability story in ten lines. We build a stripe, compute its parity, then "lose" a disk and rebuild its exact bytes from the survivors plus parity. Change which disk fails — it always comes back.
Parity is cheap to read but expensive to update. Suppose you overwrite a single data
block
So one logical small write becomes two reads + two writes — a 4× amplification, and the parity disk (RAID 4) or parity blocks (RAID 5) become hot. This is why RAID 5 is superb for large sequential writes (compute parity once for a whole stripe) and painful for small random writes — databases with many tiny updates often choose RAID 10 instead.
A stripe's data and its parity live on different disks, so they cannot be updated in one atomic
step. If power fails between writing the new data and writing the new parity, the stripe is now
inconsistent — parity no longer matches data — and nothing detects it until a disk
later fails and you reconstruct from that stale parity, silently returning wrong bytes. This is
the RAID write hole. Hardware controllers plug it with battery-backed cache (finish the
write after power returns); software systems like
The single most expensive misconception in all of storage: "we're on RAID 6, our data is safe." RAID
protects against disk hardware failure and nothing else. It faithfully, instantly replicates a
rm -rf /, a ransomware encryption, a buggy write, or a controller that scribbles garbage —
across every disk in the array. It does not protect against fire, theft, or the building flooding.
Mirroring a mistake gives you a very reliable copy of the mistake. RAID buys you availability
(keep serving through a dead disk) and sometimes performance; a real
backup is a separate, ideally offline and off-site, point-in-time copy. You need both,
and they solve different problems. Never let RAID lull you out of backups.
When a disk dies, the array runs degraded and must rebuild the lost disk
onto a spare by reading every surviving disk in full and recomputing the missing blocks. For a
modern 16 TB drive at a realistic ~150 MB/s rebuild rate, that is
Worse, rebuild stresses the surviving disks — reading them cover to cover, at exactly the moment they are the same age and model as the one that just died. As drives grew past a few terabytes, the probability of a second failure (or an unrecoverable read error) during a multi-day rebuild stopped being negligible. That is the whole argument for RAID 6: two parities mean the array survives a second failure during the rebuild. For large arrays of large disks, RAID 6 is not paranoia — it is the statistically responsible default.