RAID: why two disks do not make a backup
The Central Document Warehouse, named after its Manager, has launched a grand modernisation. The manager has bought a second safe and declared an end to hardware failures, mistakes and fires. Frank the warehouse clerk is trying to explain that two safes aren't the same thing as a backup. So far, without success. Let's meet RAID — and find out what it can actually protect.
The manager's great investment
Monday, eight o'clock. The manager bursts into the warehouse, dragging a giant box.
— GENTLEMEN! I'VE HAD A BRILLIANT IDEA!
— Good morning, boss.
— NO MORE LOST DOCUMENTS! FROM TODAY WE KEEP THEM IN TWO SAFES!
— What was wrong with the first one?
— NOTHING! THAT'S WHY I BOUGHT ANOTHER!
— What exactly are you trying to achieve?
— WHEN ONE BREAKS, THE OTHER MUST STILL WORK!
— So, RAID 1.
— DON'T INSULT ME! I WANT TWO SAFES!
🤣🤣🤣
RAID (Redundant Array of Independent Disks) organises multiple physical disks into one logical storage unit. Different RAID levels may improve performance, tolerate certain disk failures or combine both benefits. Not every RAID level provides redundancy — RAID 0 is the obvious example.
Our safes are stand-ins for disks. Actual RAID uses hardware or software to organise blocks of data, rather than paper folders.
RAID 0 — two warehouse clerks, zero protection
— Frank! From now on we split the documents into pieces!
— Pieces?!
— YOU TAKE THE FIRST PIECE, STEVE THE SECOND!
— But it's one invoice!
— THEN SPLIT IT!
— What if Steve calls in sick?
— THEN YOU'LL DO THE WORK OF TWO!
— But I haven't got his half of the invoice!
— THEN WHY DID WE SPLIT IT?!
🤣🤣
RAID 0 distributes data blocks across several disks, a technique called striping. Parallel disk activity may improve performance, and capacities add up. But there are no redundant copies or parity blocks to reconstruct missing data.
With four 1 TB disks, usable capacity is approximately 4 TB. If any one disk fails, the entire array usually becomes unusable. RAID 0 is a particularly unfortunate way to increase the risk of losing data if you mistake it for fault tolerance.
— So more storage?!
— Yes.
— And possibly faster?!
— Yes.
— And safer?!
— No.
— THEN WHO CALLED IT RAID?!
RAID 1 — two safes, identical documents
The manager changes tactics.
— NO MORE SPLITTING INVOICES! EVERY DOCUMENT GOES IN BOTH SAFES!
— So two identical copies of the current data?
— EXACTLY!
— If one disk fails, we can use the other.
— FINALLY SOMEONE APPRECIATES MY GENIUS!
RAID 1 is mirroring: writing the same data to multiple disks. A typical pair of 1 TB drives offers about 1 TB of usable capacity. Losing one disk doesn't necessarily interrupt access to the stored data.
Just then, the accountant arrives.
— Boss, I accidentally deleted an invoice.
— NO PROBLEM! WE HAVE A SECOND SAFE!
— But the system deleted the file from both disks.
— ...
— RAID 1 mirrors changes and deletions too.
— ...
— Including accidental ones.
— WHICH IDIOT INVENTED AUTOMATIC DELETION FROM BOTH SAFES AT ONCE?!
🤣🤣🤣
Here's the crucial distinction: two live copies of the present state aren't an independent backup from an earlier point in time. If a document is deleted, overwritten or encrypted by malware, RAID 1 normally mirrors the unwanted change.
RAID 5 — clerks and emergency calculation sheets
More clerks are hired. Instead of copying every document in full, they distribute the data and keep special information that can help reconstruct anything missing.
— So if one clerk loses his entire cabinet, we can restore the documents?
— Yes, using the remaining disks and parity information.
— What if two cabinets disappear?
— Typical RAID 5 cannot tolerate two simultaneous disk failures.
— THEN WHY DO WE EMPLOY THREE CLERKS IF TWO CAN'T TAKE THE DAY OFF?!
🤣🤣
RAID 5 requires at least three disks. It distributes data blocks and parity across the disks. Parity lets us reconstruct missing blocks when one disk fails. It does not mean that one designated disk contains a complete backup of the others.
Four 1 TB disks give approximately 3 TB of usable space. Parity consumes capacity equivalent to one disk. In practice, writes require additional work, and a rebuild after failure can take a long time while heavily loading the surviving drives.
Note: P(A), P(B) and P(C) in the drawing represent parity for particular stripes, not files literally named that way.
RAID 6 — the manager demands two lifeboats
— GENTLEMEN! ONE DISK FAILURE ISN'T ENOUGH!
— Isn't enough?!
— I WANT THE ARRAY TO SURVIVE TWO FAILURES!
— Then consider RAID 6.
— EXCELLENT!
— We need at least four disks and extra recovery information.
— AND I HAVE TO PAY MORE AGAIN?!
— Yes.
— ACCOUNTING!!!
🤣🤣
RAID 6 uses two independent sets of recovery information and can tolerate the loss of any two disks in the array. We label them P and Q in the diagram. They aren't two complete copies of every document.
Four 1 TB disks provide about 2 TB of usable space. That's better disk-failure tolerance than RAID 5, at the price of capacity and additional work when writing data.
RAID 10 — two pairs of twins
Four warehouse clerks form two pairs.
— Within each pair, both keep identical records.
— And work gets divided between the pairs?
— Exactly.
— So we've combined RAID 1 and RAID 0?
— Yes. RAID 10.
— AND TWO DRIVES CAN FAIL?!
— Sometimes. It depends which ones.
— WHAT DO YOU MEAN, WHICH ONES?!
— If both drives in one mirror pair fail, that pair's data is lost.
— THEN FORBID THEM FROM FAILING IN PAIRS!
🤣🤣🤣
RAID 10 combines mirroring with striping across mirror pairs. It normally needs at least four disks. Four 1 TB drives provide roughly 2 TB. One disk failure can be tolerated; two can be tolerated in some combinations but not all.
RAID 10 is commonly used when performance, availability and predictable behaviour under load matter. Real results still depend on hardware, workload and implementation, not just the RAID number.
The accountant's big table
The accountant carries a chart into the room. The manager covers his eyes.
— WHY ARE THERE NUMBERS AGAIN?!
— Because we should know how much disk capacity we buy and how much we can actually use.
— CAN'T YOU JUST WRITE “LOTS”?!
| RAID | Example | Usable | Failed disks |
|---|---|---|---|
| 0 | 4 × 1 TB | 4 TB | 0 |
| 1 | 2 × 1 TB | 1 TB | 1 |
| 5 | 4 × 1 TB | 3 TB | 1 |
| 6 | 4 × 1 TB | 2 TB | 2 |
| 10 | 4 × 1 TB | 2 TB | 1 or 2 — depending on pairs |
These are approximate values using equal-size disks, ignoring filesystem metadata and TB/TiB unit differences. Actual usable capacities may vary. Unequal disk sizes can also leave some capacity unused depending on the solution.
Rebuild — repairing a safe while the warehouse stays open
One day, a drive fails. The warehouse is still working, but the manager looks pale.
— Boss, the array is degraded.
— WHICH MEANS?!
— It works, but some or all of its protection against another failure is gone.
— THEN PUT IN A NEW DISK!
— We are. Now we have to rebuild the missing data onto it.
— HOW LONG?!
— Depends on capacity, speed and load.
— THEN COPY FASTER!
— Rebuilding adds work to the remaining drives.
— SO WHAT?!
— If another failure happens and we run out of redundancy...
— DON'T FINISH THAT SENTENCE!
🤣🤣
A rebuild reconstructs missing data or parity after a failed drive is replaced. RAID 1 can rebuild by copying a mirror; RAID 5 and 6 reconstruct missing blocks from surviving data. Large drives, heavy workloads and read errors can make the process slower or more difficult.
A hot spare is a spare drive already available for a compatible system to use automatically after a failure. It isn't a backup, and it doesn't guarantee that rebuilding will succeed.
Hardware or software RAID? Who runs the warehouse?
— WE BOUGHT A VERY EXPENSIVE RAID CONTROLLER! — announces the manager.
— We could also have used software RAID.
— THE COMPUTER PRETENDS TO BE A CONTROLLER?!
— The operating system manages the array.
— AND MY CONTROLLER?!
— It can still be useful. Depends on the requirements.
Hardware RAID uses a dedicated controller, while software RAID is managed by software such as Linux mdadm. Both have strengths and weaknesses. Consider failure recovery, monitoring, portability between machines, performance and the reliability of the overall design.
Some filesystems and storage platforms have their own redundancy and integrity mechanisms. Not all of them fit neatly into classic numbered RAID levels.
RAID is not a backup. The accountant has proof
The accountant arrives with another problem.
— Boss, malware encrypted every document!
— DON'T WORRY! WE HAVE RAID!
— The encrypted version is on both drives.
— What about the file we deleted yesterday?
— Gone from the whole array.
— What if someone steals the entire server?
— The RAID array goes with it.
— BUT I BOUGHT TWO SAFES!!!
RAID can support availability and performance under specific disk-failure scenarios. By itself, it provides no history of earlier file versions and no guarantee against accidental deletion, ransomware, theft, operator errors or destruction of an entire location.
A backup is a separate, restorable copy of your data, appropriately isolated from the source. We'll explore versioning, off-site copies and recovery testing in our next story, “Backups: why one copy may be no copy at all”.
Finale — two safes and one fire
The manager stands on an empty lot. Yesterday, a warehouse stood here.
— WHERE'S MY WAREHOUSE?!
— It burned down, boss.
— AND THE SAFES?!
— They were inside.
— BUT THERE WERE TWO OF THEM!
— In the same building.
— WHAT ABOUT BACKUPS?!
— We didn't make any.
— WHY NOT?!
— You said RAID was enough.
— ...
— We have your email. With three exclamation marks.
— DELETE THAT EMAIL IMMEDIATELY!
— From which backup?
🤣🤣🤣🤣
Remember: RAID may help you survive some disk failures, but it is not an independent backup. Even the best-designed array still needs monitoring, a disk-replacement procedure and real, tested backups.
The Central Document Warehouse Management reports that buying a third safe is not an approved fire-protection plan. The manager has appealed the decision.
