Cheat sheet: RAID levels
What each RAID level does, how many disks it needs, how many failures it survives and when to use it.
Prints on one or two pages, without the site menus.
RAID combines several disks into one logical volume, for speed, for safety or both. It is not a backup: it protects against a disk failing, not against deleting a file, a virus, a fire or a controller fault.
| Level | Minimum disks | Usable space | Survives | Speed | Good for |
|---|---|---|---|---|---|
| RAID 0 (striping) | 2 | All of it (n) | Nothing. One disk fails, all data is lost | Fastest reads and writes | Scratch space, video editing, anything you can recreate |
| RAID 1 (mirroring) | 2 | Half (n / 2) | 1 disk in each mirror | Fast reads, normal writes | Operating system disks, small important volumes |
| RAID 5 (stripe plus parity) | 3 | n - 1 | 1 disk | Good reads, slower writes | File servers, general purpose |
| RAID 6 (double parity) | 4 | n - 2 | 2 disks | Good reads, slower writes | Large arrays of big disks |
| RAID 10 (mirrored stripes) | 4 | Half (n / 2) | 1 disk per mirror pair (at least 1) | Fast reads and writes | Databases and busy virtual machines |
How to choose
- Need speed and can lose the data: RAID 0.
- Two disks, want safety: RAID 1.
- Capacity and some safety, mostly reads: RAID 5. With very large disks, prefer RAID 6, because a rebuild takes a long time and a second failure during it loses everything in RAID 5.
- Lots of small writes and cannot slow down: RAID 10.
Worked example
Six 4 TB disks:
| Level | Usable space |
|---|---|
| RAID 0 | 24 TB |
| RAID 5 | 20 TB |
| RAID 6 | 16 TB |
| RAID 10 | 12 TB |
When a disk fails
- Do not panic and do not pull more than one disk. The array is running without a safety net.
- Confirm which disk it is (the controller, or
cat /proc/mdstaton Linux software RAID). - Replace it with the same size or larger and start the rebuild.
- Keep the data backed up before, during and after. A rebuild stresses every remaining disk.
- Record the failure and the replacement in your service log.
Hardware, software and hot spares
- Hardware RAID is done by a controller card. Software RAID is done by the operating system (Linux
mdadm, Windows Storage Spaces, ZFS). - A hot spare is an idle disk that takes over automatically when one fails, shortening the time you run unprotected.