RAID Capacity Calculator
With N disks of size S each, usable capacity per level is as follows. The example column uses four 4 TB disks.
| Level | Usable capacity | 4 x 4 TB |
|---|---|---|
| RAID 0 | N x S | 16 TB |
| RAID 1 | S | 4 TB |
| RAID 5 | (N - 1) x S | 12 TB |
| RAID 6 | (N - 2) x S | 8 TB |
| RAID 10 | N / 2 x S | 8 TB |
Fault Tolerance and Minimum Disks
| Level | Minimum disks | Disks that may fail |
|---|---|---|
| RAID 0 | 2 | None |
| RAID 1 | 2 | All but one |
| RAID 5 | 3 | 1 |
| RAID 6 | 4 | 2 |
| RAID 10 | 4 | 1 per mirror pair |
RAID 10 always survives one failed disk and can survive more, as long as no mirror pair loses both of its disks.
A Second Worked Example
Six 2 TB disks, 12 TB raw:
- RAID 0: 12 TB usable, no failure allowed.
- RAID 5: 10 TB usable, one disk may fail.
- RAID 6: 8 TB usable, two disks may fail.
- RAID 10: 6 TB usable, one disk per mirror pair may fail.
What Changes the Number
- Mixed disk sizes: every member counts as the size of the smallest disk.
- TB and TiB: disks are sold in decimal terabytes, while Linux tools often report binary units. A 4 TB disk shows as about 3.6 TiB.
- File system overhead: the file system on top uses a few percent more.
- Hot spares: a spare disk waits to replace a failed one and adds no capacity.
The Levels in Plain Words
- RAID 0 (striping): data is split across all disks. Fast, all capacity usable, and one failed disk loses everything.
- RAID 1 (mirroring): every disk holds the same data. Simple and robust, with half or less of the raw space usable.
- RAID 5 (striping with parity): one disk's worth of parity is spread across all disks. Good capacity, slower writes.
- RAID 6 (double parity): like RAID 5 with two disks' worth of parity.
- RAID 10 (striped mirrors): pairs of mirrors with data striped across them. Fast reads and writes, half the raw space usable.
Rebuilds and Large Disks
After a disk fails, the array runs degraded until a replacement is rebuilt from the remaining disks. During that time a RAID 5 array has no redundancy left, and a rebuild of large disks reads every sector and can take many hours. A second failure or a read error in that window loses data. For arrays of large disks, RAID 6 or RAID 10 is the safer choice. For databases with many small writes, RAID 10 also avoids the parity write overhead of RAID 5 and 6. Disk types are compared in NVMe vs SSD.
Hardware and Software RAID
Hardware RAID runs on a controller card, often with its own cache, and the operating system sees one disk. Software RAID is managed by Linux itself, most often with mdadm. Check a software array:
cat /proc/mdstat
sudo mdadm --detail /dev/md0
A hardware array is checked with the controller vendor's tool. Either way, set up alerts so a failed disk is noticed the same day. A new array still needs a file system; see how to format a disk in Linux. RAID is a feature of physical servers; see VPS vs dedicated server.
RAID Is Not a Backup
RAID protects against a disk failing. It does not protect against a deleted file, a corrupted database, or ransomware, because every change is written to all disks at once, and a failing controller can damage the whole array. Keep separate backups on other hardware; the difference between the safety nets is in snapshot vs backup.