Raid
Raid - Redudant Array of Inexpensive Disks
Raid can do two things:
- improve performance by “striping” data across multiplle drives letting serveral drives work at the same time to supply or ingest a single data stream
- it can replicate data across multiple drives, decreasing the risk associated with a single failed disk
Hardware vs Software
Disks are the bottleneck, so hardware RAID isn’t inherently faster than software RAID. Its historical edge was nonvolatile write buffers (instant-looking writes, avoids the RAID 5 write hole) — cheap cards without them have no advantage.
Warning
A failing hardware RAID controller can corrupt every disk in the array, replication won’t save you. Prefer kernel-managed software RAID.
Levels
RAID levels are misleading “higher” levels are not necessaarily “better”. the levels are simple different configurations; use whichever suites your needs.
| Level | Type | Benefit | Min disks |
|---|---|---|---|
| JBOD | Concat | None | 2 |
| 0 | Stripe | Speed | 2 |
| 1 | Mirror | Redundancy | 2 |
| 1+0 / 0+1 | Stripe+Mirror | Speed + redundancy | 4 |
| 5 | Stripe + parity | Redundancy, ~67%+ space eff., 1-drive fault | 3 |
| 6 | Stripe + dual parity | 2-drive fault | 4 |
Note
2,3,4 levels exist but are basically never used