A topic in the Open Knowledge Graph — a free, open map of 15,495 topics and the order to learn them in.
RAID combines several physical disks so that the operating system sees one larger, faster or more reliable disk. It uses three techniques: striping spreads consecutive blocks across disks so they can be read in parallel, mirroring keeps identical copies on two or more disks, and parity stores the XOR of a group of blocks so any one lost block can be rebuilt. Each RAID level is a different trade-off among capacity, performance and the number of disk failures it can survive. The idea was set out in a 1988 paper by David Patterson, Garth Gibson and Randy Katz.
Draw four disks as columns and fill in block numbers for RAID 0, RAID 1, RAID 4 and RAID 5, so the layouts can be compared side by side. Work a parity example by hand: XOR three short bit strings, erase one, and rebuild it from the others. Then build a table of usable capacity, failures tolerated and cost of a small write for each level.
A single disk has three limits. It holds only so much data. It serves only so many requests per second. And when it fails, everything on it is gone. RAID addresses all three by grouping several disks behind one interface. The operating system, or a hardware controller, translates each logical block number into a disk and a position, so file systems above it need no changes.
Striping spreads data. Logical block 0 goes to disk 0, block 1 to disk 1, and so on, wrapping around. A large read can then pull from every disk at once. RAID 0 is pure striping. It gives the full capacity of all disks and the best performance, but no redundancy. If any one disk fails, every file loses pieces, so RAID 0 is less reliable than a single disk.
Mirroring copies data. In RAID 1, every block is written to two disks. Either copy can serve a read, and the array survives the loss of one disk in each pair. The cost is capacity: half the raw space holds copies.
Parity gives redundancy more cheaply. For each stripe of data blocks, the array stores one extra block equal to their bitwise XOR. XOR has a useful property: if any one block in the group is lost, XORing all the survivors reproduces it. RAID 4 puts all parity on one dedicated disk. RAID 5 rotates the parity block from disk to disk across stripes. With N disks, both give N - 1 disks of usable space and survive one failure. RAID 6 stores two independent parity blocks per stripe, using N - 2 disks of space, and survives two failures.
Parity has a price for small writes. To change one block, the array must read the old data and old parity, compute the new parity, and write both, about four I/Os for one logical write. In RAID 4 every one of those parity writes hits the same disk, which becomes a bottleneck. RAID 5's rotating parity spreads that work across all disks.
Two practical points matter. First, after a disk fails, the array runs in a degraded state until a replacement is rebuilt by reading every surviving disk. On large drives this takes hours, and a second failure during that window can lose data. That risk is one reason RAID 6 is popular. Second, RAID guards against hardware failure only. Deleting a file deletes it on every disk, so backups are still needed.
No topics depend on this one yet.