Raid

Raid - Redudant Array of Inexpensive Disks

Raid can do two things:

  1. improve performance by “striping” data across multiplle drives letting serveral drives work at the same time to supply or ingest a single data stream
  2. 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.

LevelTypeBenefitMin disks
JBODConcatNone2
0StripeSpeed2
1MirrorRedundancy2
1+0 / 0+1Stripe+MirrorSpeed + redundancy4
5Stripe + parityRedundancy, ~67%+ space eff., 1-drive fault3
6Stripe + dual parity2-drive fault4

Note

2,3,4 levels exist but are basically never used