RAID Levels & ZFS RAID-Z
Traditional RAID Configurations
| RAID Level | Description | Minimum Drives | Fault Tolerance | Usable Capacity | Key Trade-off |
|---|---|---|---|---|---|
| RAID 0 | Striping | 2 | 0 drives | $N \times \text{Size}$ | Zero redundancy; 1 drive failure loses everything |
| RAID 1 | Mirroring | 2 | $N - 1$ drives | $1 \times \text{Size}$ | 50% storage overhead; excellent read speeds |
| RAID 5 | Striping with single distributed parity | 3 | 1 drive | $(N - 1) \times \text{Size}$ | Susceptible to URE during long rebuilds |
| RAID 6 | Striping with dual distributed parity | 4 | 2 drives | $(N - 2) \times \text{Size}$ | Slower write IOPS due to dual parity calculations |
| RAID 10 (1+0) | Mirrored stripes | 4 | 1 drive per mirror | $\frac{N}{2} \times \text{Size}$ | Best IOPS and rebuild speed; 50% capacity penalty |
ZFS RAID-Z vs Traditional RAID
Traditional hardware RAID suffers from the RAID 5 Write Hole: if power fails mid-write between data and parity blocks, the array enters an inconsistent state that cannot be detected by the hardware controller.
ZFS RAID-Z Innovations:
- Dynamic Stripe Width: Every write in ZFS (Zettabyte File System) is a full-stripe write via Copy-on-Write (CoW) Filesystems, mathematically eliminating the RAID write hole.
- RAID-Z1: Single parity per stripe (similar to RAID 5).
- RAID-Z2: Dual parity per stripe (similar to RAID 6). Highly recommended for high-capacity modern HDDs (>8TB) where rebuilds can take days.
- RAID-Z3: Triple parity per stripe. Survives up to 3 simultaneous disk failures.
- Striped Mirrors (RAID 10 equivalent): Recommended for high random write/IOPS workloads like databases and virtualization.