Summary

RAID and Data Integrity

From: RAID and Data Integrity: Advanced Operating Systems Chapters 38 and 44

Core Goals

RAID combines multiple disks to create storage that is faster, larger, and more reliable than a single disk. To the file system, RAID appears as one linear array of blocks, while internally it maps each logical I/O into one or more physical disk operations.

Key RAID Levels

  • RAID 0 (striping): Improves performance by spreading data across disks, but provides no redundancy.
  • RAID 1 (mirroring): Keeps multiple copies of each block on different disks. Reads can be served from either copy, but writes must update all copies. It is simple and reliable, but has a high capacity cost.
  • RAID 4 (parity): Uses parity to reduce the space overhead of redundancy, but parity handling can create performance costs.
  • RAID 5 (rotating parity): Distributes parity across disks, improving parallelism over RAID 4 and avoiding a single dedicated parity disk, though small writes still perform poorly.

RAID Trade-offs

No RAID level is best in every case. Choosing a level depends on the workload and priorities such as performance, usable capacity, fault tolerance, chunk size, and number of disks.

Data Integrity

Data integrity focuses on ensuring that stored data remains correct and retrievable despite unreliable storage devices. Modern systems must protect against more than complete disk failure; they must also handle corruption and latent sector errors.

Integrity Techniques

  • Checksums: Used to detect corruption by storing and later verifying a computed value for data.
  • Scrubbing: Periodically scans stored data to detect and address hidden errors before they combine with other failures.
  • Protection against latent sector errors: Important because data spread across many disks becomes more vulnerable to undetected faults.

Main Takeaway

RAID improves performance, capacity, and fault tolerance through redundancy and parallelism, while data integrity techniques such as checksums and scrubbing help ensure that data remains correct over time. Reliable storage therefore requires both RAID-based fault tolerance and integrity mechanisms.