RAID stands for two things historically:
| Acronym | Meaning |
|---|---|
| Redundant Array of Inexpensive Disks | Original meaning — cheap disks used together |
| Redundant Array of Independent Disks | Modern preferred meaning |
The core idea: combine multiple physical disks into one logical storage unit to gain redundancy (protection against disk failure), performance, or both.
Without RAID, if one disk in a set fails, all data on it is lost permanently. RAID was invented to solve this by keeping copies or recovery information spread across multiple disks.
| Feature | Hardware RAID | Software RAID |
|---|---|---|
| Implementation | Dedicated RAID controller card | Done by the OS/kernel |
| Cache | Has hardware cache (with battery backup) | No hardware cache |
| Speed | Faster (historically) | Comparable on modern SSDs |
| Portability | Disks tied to specific controller | Works on any disk or partition |
| Cost | Expensive | Free |
| Flexibility | Fixed to controller type | Can mix any disk type or partition |
Software RAID in Linux:
mdadm tool| RAID Level | Also Known As | Min Disks | Disk Failure Tolerance | How It Works | Usable Space |
|---|---|---|---|---|---|
| RAID 0 | Striping | 2 | 0 (no redundancy) | Writes alternately across disks | 100% |
| RAID 1 | Mirroring | 2 | 1 disk | Exact copy written to all disks | 50% (2 disks) |
| RAID 5 | Striping + Parity | 3 | 1 disk | Data + single parity spread across disks | (N-1)/N |
| RAID 6 | Striping + Double Parity | 4 | 2 disks | Data + two parity sets spread across disks | (N-2)/N |
| RAID 10 | RAID 1+0 | 4 | 1 per mirrored pair | Mirror pairs, then stripe across pairs | 50% |
Usable Space = (1 - 1/N) x Total
Example with 3 x 5 GB disks:
N = 3
Usable = (1 - 1/3) x 15 GB = 10 GB
One disk worth of space is used for parity.
Example with 4 x 5 GB disks:
N = 4
Usable = (1 - 1/4) x 20 GB = 15 GB