Quiz 2
Registry Synced

21 - RAID Systems

370 words
2 min read

Reading compass

Now · 🎯 Learning Objectives

21 - RAID Systems

🎯 Learning Objectives

After reading this topic, you will be able to:
  • Explain RAID levels 0-6 and their trade-offs
  • Compute parity using XOR
  • Compare RAID levels by cost, performance, and reliability

📖 Core Content

21.1 RAID Overview

RAID (Redundant Array of Independent Disks) combines multiple disks into one logical unit for:
  • Performance: Striping (parallel I/O)
  • Reliability: Redundancy (mirroring or parity)

21.2 RAID Levels

(Diagram)
LevelDescriptionMin DisksSpace EfficiencyReadWriteFault Tolerance
0Striping only2100%ExcellentExcellentNone
1Mirroring250%GoodGood1 disk
2Bit-level + Hamming ECC3~70%GoodPoor1 disk
3Byte-level + dedicated parity3~75%GoodPoor1 disk
4Block-level + dedicated parity3~75%GoodPoor (bottleneck)1 disk
5Block-level + distributed parity3~75%GoodGood1 disk
6Block-level + dual distributed parity4~66%GoodPoor2 disks

21.3 Parity Computation (XOR)

Parity = XOR of all data bits:
P=D1D2D3DnP = D_1 \oplus D_2 \oplus D_3 \oplus \dots \oplus D_n
Recovery: D1=PD2D3DnD_1 = P \oplus D_2 \oplus D_3 \oplus \dots \oplus D_n

Worked Example

Data blocks: 0100, 0101, 0100, 0001 Parity = 0100 ⊕ 0101 ⊕ 0100 ⊕ 0001
  • Bit 1: 0⊕0⊕0⊕0 = 0
  • Bit 2: 1⊕1⊕1⊕0 = 1
  • Bit 3: 0⊕0⊕0⊕0 = 0
  • Bit 4: 0⊕1⊕0⊕1 = 0 Parity = 0100 If disk 2 fails: Recover = parity ⊕ remaining data = 0100 ⊕ 0100 ⊕ 0100 ⊕ 0001 = 0101

📝 Practice Questions

Q1. Compare RAID 0, RAID 1, and RAID 5.

Answer
RAID 0: Striping only — best performance, no fault tolerance. RAID 1: Mirroring — 50% space, can lose one disk. RAID 5: Distributed parity — good balance of performance, space (~75%), and single-disk fault tolerance.

Q2. What is the XOR parity for data blocks 1010, 1100, 0110?

Answer
1010 ⊕ 1100 = 0110 0110 ⊕ 0110 = 0000
Parity = 0000

Q3. Which RAID level can survive two simultaneous disk failures?

Answer
RAID 6 — it uses dual distributed parity. Requires at least 4 disks and can tolerate any 2 disk failures.

🔗 Cross-References

Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.