RAID 5 is a fault-tolerant disk array configuration that uses block-level striping and distributed parity to protect data against a single drive failure. Requiring at least three physical drives, it balances storage efficiency, read throughput, and redundancy. Unlike mirroring setups, RAID 5 relies on calculated parity data rather than full duplicates to reconstruct lost blocks when one disk goes offline.
How it works
Data written to a RAID 5 array is divided into blocks and striped across all member disks. Alongside the data blocks, the controller calculates parity information using the bitwise XOR logical operation. Instead of writing all parity data to a single dedicated disk—which creates a severe write bottleneck in RAID 4—RAID 5 rotates the parity blocks evenly across every drive in the set.
Because multiple spindles or flash controllers serve blocks simultaneously, sequential and random read speeds scale well with the number of drives. However, small random writes suffer from the RAID 5 write penalty: updating a single block requires reading the old data, reading the old parity, calculating the new parity, and writing both the new data and new parity back to disk.
Total usable capacity follows the formula (n - 1) * smallest_drive_size, where n is the total number of drives. You can explore how different array geometries affect throughput and resilience in our overview of DIY RAID array reliability and performance.
Example
Consider a storage server equipped with four 2 TB drives configured in RAID 5. Applying the capacity formula (4 - 1) * 2 TB yields 6 TB of usable storage, while the equivalent of one 2 TB drive is consumed by distributed parity across the four disks.
On a Linux host, you can assemble this software array using mdadm:
mdadm --create --verbose /dev/md0 --level=5 --raid-devices=4 /dev/sdb /dev/sdc /dev/sdd /dev/sde
For detailed configuration parameters and tuning options on Linux systems, review our manual software RAID setup guide.
What matters when choosing a server or hosting
- Workload profile: RAID 5 fits read-heavy workloads such as file servers, media repositories, and backup targets. Avoid it for write-intensive transactional databases or heavy virtualization storage where the write penalty degrades latency.
- Drive media and capacity: Rebuilding a degraded array requires reading every sector of the surviving drives. With large-capacity spinning hard drives (HDDs), rebuilds can take many hours or days, increasing the chance of an unrecoverable read error or a second drive failing. Enterprise NVMe or SATA SSDs drastically reduce rebuild windows.
- Controller type: Hardware RAID cards with battery-backed or flash-backed write cache (BBU/FBWC) absorb parity calculation overhead and protect against data corruption during power loss. Software RAID offers portability across hardware, as covered in our guide to building a high-performance storage array.
Common mistakes
- Using high-capacity consumer HDDs: Large SATA drives have higher unrecoverable read error rates, which can abort a rebuild and destroy the entire volume when a single drive fails.
- Mixing drive sizes or speeds: The array caps usable capacity per disk at the size of the smallest member drive, and slower drives throttle the entire stripe group.
- Treating RAID 5 as a backup: Parity protects against hardware failure of one disk, not accidental deletion, filesystem corruption, ransomware, or simultaneous multi-drive failure.
FAQ
What happens if two drives fail at the same time in RAID 5?
All data on the array is lost. RAID 5 only holds enough parity information to mathematically reconstruct one missing drive; losing a second drive before the first is rebuilt makes recovery impossible without external backups.
Can I add another drive to an existing RAID 5 array?
Yes, both Linux mdadm and most enterprise hardware RAID controllers support online capacity expansion. Adding a drive triggers a restripe operation that redistributes existing data and parity across all disks, though performance is reduced until the reshape completes.
How does RAID 5 compare to RAID 6?
RAID 6 uses dual distributed parity, requiring at least four drives and sacrificing the capacity of two disks instead of one. While RAID 6 incurs a higher write penalty, it survives two simultaneous drive failures, making it safer for large-capacity HDD arrays.