Mass Storage & Disk Scheduling

RAID

/ rayd /

Imagine you must copy a long book by hand before a deadline. One scribe is slow and, if she falls ill, the job dies with her. So you hire a team and play it smart: you could split the book so several scribes each copy a different part at once (faster), or have two scribes copy the whole book so a spare exists if one is lost (safer), or keep careful checksums so that if one scribe's pages are destroyed you can reconstruct them from the others. RAID does exactly these tricks with several disks acting as one.

Concretely, RAID (a redundant array of independent disks) combines multiple physical drives into a single logical unit, using three core ideas in various blends. Striping (RAID 0) spreads consecutive blocks across all drives so reads and writes happen in parallel — pure speed, but zero redundancy: lose any one drive and all data is gone. Mirroring (RAID 1) keeps a full duplicate copy on a second drive — survive a drive failure, but you pay double the disks for the same capacity. Parity (RAID 5, and RAID 6 with double parity) stripes data plus a computed check value across drives so that if one drive (two, for RAID 6) dies, its contents can be rebuilt by recomputing from the survivors — a balance of capacity, speed, and redundancy.

Why it matters and its honest limits: RAID lets you trade among performance, capacity, and reliability deliberately rather than accepting whatever one disk gives. But it carries crucial caveats. RAID is not a backup — it protects against drive hardware failure, not against accidental deletion, corruption, or ransomware, all of which it faithfully replicates or stripes. Redundancy is not invulnerability: RAID 5 survives one failure, but during the rebuild (re-creating a replaced drive from the others, which can take many hours on big drives) the array is exposed, and a second failure then loses everything — the reason large arrays often prefer RAID 6. And RAID 0 increases failure risk, since any one of several drives failing kills the whole stripe.

A four-drive RAID 5: three drives' worth of data plus one drive's worth of parity, spread across all four. If drive 2 dies, you pull it, insert a fresh one, and the array rebuilds drive 2's data by recomputing it from the other three — but until that rebuild finishes, a second drive failure would be fatal.

Speed, redundancy, cost: RAID lets you pick a blend, not all three.

RAID is redundancy, not backup. It guards against a drive dying, but it faithfully mirrors or stripes your mistakes — a deleted file or corrupted data is gone on every drive at once. You still need real backups.

Also called
redundant array of independent disksredundant array of inexpensive disks獨立磁碟備援陣列