RAID is a method of combining multiple physical hard drives into one logical drive to improve performance or provide redundancy. However, it's important to note that RAID IS NOT BACKUP; it ensures uptime through a drive failure but does nothing against data deletion, ransomware, fire, theft, or user errors.
What RAID Is
Combining multiple physical drives into one logical drive for speed, survival of drive failures, or both. Drives fail, and one drive alone can be slower than several combined.
The Levels That Matter
RAID 0 (Striping)
- Speed: Data is split across all drives, providing the maximum read/write speed.
- Capacity: Combined capacity of all drives.
- Protection: None; losing any single drive means losing all data.
- Use Case: Scratch space where data loss is acceptable.
Example: With 4 x 8TB drives in RAID 0, you get a total capacity of 32TB but no redundancy. Any failure results in the loss of all data.
RAID 1 (Mirroring)
- Speed: Reads can be faster as both drives can answer simultaneously; writes are slower due to needing to write to both.
- Capacity: Half the total capacity (e.g., 8TB usable from 2 x 8TB drives).
- Protection: Perfect copies of data on two drives. Losing one drive has no impact on availability.
- Use Case: Simple and reliable for small arrays, like a 2-bay NAS.
Example: With 2 x 8TB drives in RAID 1, you get 8TB usable space but with full redundancy. If one drive fails, the other takes over seamlessly.
RAID 5 (Striping + Single Parity)
- Speed: Good read performance; write performance is slower due to parity calculations.
- Capacity: Total capacity minus one drive (e.g., 4 x 8TB drives = 24TB usable).
- Protection: Can survive the failure of a single drive. During rebuild, all remaining drives are stressed.
- Use Case: Classic balance between performance and redundancy.
Example: With 4 x 8TB drives in RAID 5, you get 24TB usable space but with protection against one drive failure. However, during a rebuild after a drive failure, the remaining drives will be under heavy load for hours to days, which can increase the risk of unrecoverable read errors.
RAID 6 (Dual Parity)
- Speed: Slower writes compared to RAID 5 due to dual parity.
- Capacity: Total capacity minus two drives (e.g., 4 x 8TB drives = 20TB usable).
- Protection: Can survive the failure of two simultaneous drives.
- Use Case: Suitable for large arrays with a need for higher reliability.
Example: With 4 x 8TB drives in RAID 6, you get 20TB usable space but with protection against two drive failures. This is often used in enterprise environments where data integrity and redundancy are critical.
RAID 10 (Mirror Pairs, Striped)
- Speed: Very fast read performance; write performance is slower due to mirroring.
- Capacity: Half the total capacity of drives (e.g., 4 x 8TB drives = 16TB usable).
- Protection: Can survive the failure of one drive per mirror pair.
- Use Case: Ideal for databases and other applications requiring high speed and reliability.
Example: With 4 x 8TB drives in RAID 10, you get 16TB usable space with redundancy. If one drive in a mirror fails, the other can take over without data loss.
Software vs Hardware RAID
- Software RAID (ZFS raidz, Linux mdadm, Btrfs, Unraid/Synology SHR): More flexible and modern. It doesn't lock drives to specific hardware.
- Hardware RAID: Legacy technology that locks disks to the card, making it less flexible.
Example: ZFS raidz1/raidz2 provide similar protection math as RAID 5/6 but with additional checksumming for silent data corruption detection.
The Sermon
Always remember: RAID IS NOT BACKUP. It ensures uptime through a drive failure but does nothing against deletion, ransomware, fire, theft, or user errors. Back up your data regularly to ensure it's safe from all kinds of threats.