Sub topic 8
RAID in Brief
This chapter assumes you know binary units, basic storage terms, and the difference between data and metadata. RAID is a storage organization method that combines multiple physical disks into one logical storage system.
RAID means Redundant Array of Independent Disks. It can improve performance, provide redundancy, or both. Redundancy means storing enough extra information to continue operating when a disk fails.
RAID is not a substitute for backups. A RAID array can still lose data because of accidental deletion, malware, controller failure, fire, or several disk failures during recovery.
Striping, mirroring, and parity
RAID uses three main techniques:
- Striping divides consecutive blocks across disks. It increases parallelism, but a single disk failure can destroy the whole array.
- Mirroring stores the same data on two or more disks. It provides simple recovery, but uses more storage.
- Parity stores calculated information that can reconstruct missing data. It provides redundancy with less capacity than mirroring, but writes and rebuilds are more complex.
A stripe is one set of corresponding chunks across the disks. For example, a four-disk stripe may place chunks A, B, C, and D on four different disks. Parity can be calculated from these chunks and stored on another disk.
Common RAID levels
Assume every disk has capacity C and all disks have equal size.
| RAID level | Main technique | Usable capacity | Disk failures tolerated |
|---|---|---|---|
| RAID 0 | Striping | N × C | 0 |
| RAID 1 | Mirroring | N × C / 2 | At least one per mirror pair |
| RAID 5 | Single distributed parity | (N − 1) × C | 1 |
| RAID 6 | Double distributed parity | (N − 2) × C | 2 |
| RAID 10 | Mirrored pairs plus striping | N × C / 2 | One per pair |
Here, N is the number of disks. RAID 5 normally requires at least three disks. RAID 6 normally requires at least four. RAID 10 requires an even number of disks arranged as mirrored pairs.
Performance and failure trade-offs
RAID 0 often gives high read and write performance because requests run in parallel. It has no redundancy, so the array fails if any member disk fails.
RAID 1 can read from either copy and has straightforward recovery. Its usable capacity is only half of the raw capacity when disks are paired.
RAID 5 uses one disk's worth of capacity for parity. Small writes may require reading old data and old parity, calculating new parity, and writing both values. This read-modify-write process creates a write penalty.
RAID 6 adds a second independent parity value. It handles two failed disks, but writes and rebuilds require more computation.
RAID 10 avoids parity calculations and usually rebuilds faster than RAID 5 or RAID 6. However, it uses half of the raw capacity and can fail if both disks in the same mirror pair fail.
> callout warning > During a rebuild, the surviving disks are heavily read. A second failure can therefore be especially dangerous in RAID 5. RAID 6 or RAID 10 is often preferred for large or important arrays.
Worked calculation
A six-disk RAID 5 array with 2 TB disks has usable capacity:
(6 − 1) × 2 TB = 10 TB- It tolerates one failed disk.
A six-disk RAID 10 array has:
6 × 2 TB / 2 = 6 TB- It tolerates one failure in each mirror pair, but not necessarily two arbitrary failures.
Choose RAID 0 for performance without fault tolerance, RAID 1 for simple redundancy, RAID 5 for capacity with one-disk protection, RAID 6 for protection against two failures, and RAID 10 for strong performance with predictable rebuild behavior.
Exercise
A four-disk RAID 6 array uses 3 TB disks. What is its usable capacity, and how many disk failures can it tolerate?
Show answer
Usable capacity is (4 − 2) × 3 TB = 6 TB, and the array can tolerate two failed disks.