Sub topic 3
RAID 10: Striped Mirrors
Assume you know basic PC components, storage versus RAM, and units such as GB and TB.
RAID 10: Striped Mirrors
RAID 10 combines RAID 1 mirroring with RAID 0 striping. Data is first mirrored to pairs of drives. The mirrored pairs are then striped for speed.
RAID 10 requires at least four drives. It can usually survive one failed drive in each mirror pair. It cannot survive both drives in the same pair. Read and write performance is generally strong, but usable capacity is about half of the raw capacity.
RAID 6: Surviving Two Drive Failures
RAID 6 stripes data and stores two sets of distributed parity. Parity is calculated information that can rebuild missing data. RAID 6 needs at least four drives and can survive any two drive failures. Its usable capacity is roughly the total capacity of all drives minus two drives.
RAID 6 offers more fault tolerance than RAID 5, but parity calculations can reduce write performance.
Hot-Swappable Drives and Hot Spares
A hot-swappable drive can be removed and replaced while the system is running. The drive bay, controller, and operating system must support this feature.
A hot spare is an unused drive that automatically replaces a failed RAID drive. The array then rebuilds onto the spare. A hot spare reduces the time that the array operates in a degraded state.
Hardware RAID and Software RAID
A hardware RAID controller manages the array with dedicated firmware and sometimes a processor and cache. Software RAID uses the operating system or motherboard firmware. Hardware RAID can reduce host CPU work, while software RAID is often less expensive and easier to move between compatible systems.
Calculating Usable Capacity
For equal-sized drives, let n be the drive count and s be the size of one drive.
def usable_capacity(level, n, s):
if level == 10 and n >= 4 and n % 2 == 0:
return (n // 2) * s
if level == 6 and n >= 4:
return (n - 2) * s
raise ValueError("Invalid RAID configuration")
print(usable_capacity(10, 4, 2)) # 4 TB
print(usable_capacity(6, 6, 2)) # 8 TBRAID Is Not a Backup
RAID improves availability when a drive fails. It does not protect against accidental deletion, malware, fire, theft, or corrupted files. Keep separate backups, preferably with at least one copy offline or in another location.
Choosing and Troubleshooting
Choose RAID 10 for workloads needing speed and quick recovery. Choose RAID 6 when preserving data through two drive failures matters more than write speed.
- A missing drive may indicate a failed drive, loose connection, or controller problem.
- A degraded array needs replacement and rebuilding.
- Slow performance during rebuilding can be expected.
- An array with two failed drives may be lost if both belong to one RAID 10 mirror pair.
Exercise
Four 2-TB drives use RAID 10. How much usable capacity is available, and how many drive failures can the array normally tolerate?
Show answer
The usable capacity is 4 TB. It can tolerate one failed drive in each mirror pair, but not both drives in the same pair.