Introduction to RAID
- Storage devices like hard drives and SSDs are physical components
that can fail due to moving parts (e.g., spinning platters, actuator arms).
- Redundancy is achieved by combining multiple drives to protect data if one fails.
- Important Note: RAID is not a backup solution. Always maintain a
separate backup process even when using RAID.
- RAID stands for Redundant Array of Independent Disks (or Inexpensive
Disks).
- Different RAID levels offer varying balances of performance,
redundancy, and storage efficiency.
RAID 0 (Striping)
- Requires at least two drives.
- Data is split (striped) across all drives (e.g., Block 1A on Drive 1, Block 2A on
Drive 2).
- Advantages:
- Improves read/write speeds by distributing data across multiple drives.
- Disadvantages:
- No redundancy; if one drive fails, all data is lost.
- Often called "RAID 0" because it provides zero redundancy.
RAID 1 (Mirroring)
- Requires at least two drives.
- Data is duplicated (mirrored) across all drives (e.g., Drive 1 and Drive 2 contain
identical data).
- Advantages:
- Provides full redundancy; if one drive fails, data remains accessible on
the other drive(s).
- Disadvantages:
- Requires double the storage capacity (e.g., 2TB of data requires 4TB of
storage).
- Slower write speeds compared to RAID 0 due to duplication.
RAID 5 (Striping with Parity)
- Requires at least three drives.
- Data is striped across drives, with parity data distributed across
all drives (e.g., 3 drives store data, 1 drive’s worth of parity).
- Advantages:
- Provides redundancy; if one drive fails, data can be
reconstructed using parity.
- More storage-efficient than RAID 1 (e.g., 3TB of usable space for 4TB of
total storage).
- Disadvantages:
- Performance overhead during recovery due to parity calculations.
- Can only tolerate one drive failure.
RAID 6 (Striping with Dual Parity)
- Requires at least four drives.
- Similar to RAID 5 but includes two parity blocks distributed across drives.
- Advantages:
- Can tolerate two drive failures while maintaining data availability.
- Higher redundancy than RAID 5.
- Disadvantages:
- Requires an additional drive for parity, reducing usable storage (e.g., 4 drives = 2TB
usable for 6TB total).
- Higher CPU overhead for parity calculations.
RAID 10 (RAID 1 + 0 or "Stripe of Mirrors")
- Requires at least four drives.
- Combines RAID 1 (mirroring) and RAID 0 (striping).
- Structure:
- Drives are mirrored in pairs (RAID 1).
- Mirrored pairs are then striped (RAID 0).
- Advantages:
- High performance (striping) and redundancy (mirroring).
- Can tolerate multiple drive failures (as long as no mirrored pair loses
both drives).
- Disadvantages:
- Requires double the storage capacity (e.g., 4TB of data requires 8TB of
storage).
Summary of RAID Levels
- RAID 0: Striping, no redundancy, high performance.
- RAID 1: Mirroring, full redundancy, high storage cost.
- RAID 5: Striping with parity, single-drive redundancy,
storage-efficient.
- RAID 6: Striping with dual parity, two-drive redundancy, higher
overhead.
- RAID 10: Stripe of mirrors, high performance and redundancy, high
storage cost.