RAID combines several disks so they act as one. Depending on the level, it makes storage faster, lets it survive a failed disk, or both.
| Level | Minimum disks | Survives | Usable space | In short |
|---|---|---|---|---|
| RAID 0 | 2 | No failures | 100% | Speed, no protection |
| RAID 1 | 2 | All but one disk | 50% with two disks | Mirror |
| RAID 5 | 3 | 1 disk | Total minus one disk | Striping with parity |
| RAID 6 | 4 | 2 disks | Total minus two disks | Double parity |
| RAID 10 | 4 | 1 per mirror pair | 50% | Mirrors, striped |
RAID combines several disks into one, either for speed, for protection against a disk failing, or both. The level number says how. For servers, RAID 1 (two mirrored disks) and RAID 10 (mirrors, striped) are the most common choices. No RAID level is a backup.
RAID 0: striping
Data is split across all disks, so reads and writes are fast. If any one disk fails, everything is lost. Only for data you can rebuild easily.
RAID 1: mirroring
Every disk holds a full copy. Simple and reliable, and reads can be faster. You get the capacity of a single disk. A common choice for a server’s system disks.
RAID 5: parity
Data is striped with parity, extra information that can rebuild any one missing disk. Efficient on space, but writes are slower, and rebuilding a large failed disk takes a long time and strains the remaining ones. During the rebuild, a second failure loses the array.
RAID 6: double parity
Like RAID 5 but survives two failed disks. The safer choice for large arrays of big disks, at the cost of slower writes.
RAID 10: mirrors, then striped
Disks are paired into mirrors, and the mirrors are striped. Fast for both reads and writes, rebuilds quickly, and survives one failure in each pair. The usual choice for busy databases.
Which level to choose
| Situation | Choose |
|---|---|
| Two disks in a small server | RAID 1 |
| A busy database, four or more disks | RAID 10 |
| Large storage where space matters, writes are light | RAID 6 |
| Scratch space or caches you can rebuild | RAID 0 |
| A single cloud VPS | None: the provider’s storage already handles disk failure |
RAID 5 was the default choice for years. With today’s large disks, rebuilds take many hours, and the risk of a second failure or a read error during that time is real, so RAID 6 or RAID 10 is now usually preferred for important data.
Worked example: usable space
With four 4 TB disks:
| Level | Usable | Can lose |
|---|---|---|
| RAID 0 | 16 TB | Nothing |
| RAID 5 | 12 TB | Any 1 disk |
| RAID 6 | 8 TB | Any 2 disks |
| RAID 10 | 8 TB | 1 disk in each pair, so up to 2 if they are in different pairs |
RAID 6 and RAID 10 give the same space here; RAID 6 survives any two failures, while RAID 10 is faster and rebuilds more quickly.
Hardware or software RAID
Hardware RAID uses a controller card. Software RAID, such as Linux’s mdadm or ZFS, is done by the operating system and is now the common choice on servers. Check the state of Linux software RAID with:
cat /proc/mdstat
A healthy two-disk mirror looks like this, where [UU] means both disks are up:
md0 : active raid1 sdb1[1] sda1[0]
976630464 blocks super 1.2 [2/2] [UU]
[U_] means one disk has failed and the array is running on the other. Replace the disk promptly; until you do, there is no protection. For more detail, run sudo mdadm --detail /dev/md0.
Watch the disks, not just the array
RAID only helps if you notice a failure. Set up alerts: mdadm can email when an array degrades (set MAILADDR in /etc/mdadm/mdadm.conf), and smartctl from the smartmontools package reads each disk’s own health data, which often warns before a disk fails:
sudo smartctl -H /dev/sda
On dedicated servers, ask your host whether they monitor disks and replace failed ones automatically.
RAID is not a backup. It protects against a disk failing. It does nothing about deleted files, ransomware, a bad update or a fire. Keep real backups as well.
Related
Something out of date? Software changes. If a step no longer works, tell us and we will check it and update the page.
