RAID

Many disks, one team · Part of Networking and infrastructure

Key idea

Practice

6 questions · about 3 min

Explained step by step

RAID

RAID (Redundant Array of Independent Disks) is a way of joining several hard drives or SSDs so they work as one. The main idea is storing data so that, if a disk breaks, nothing is lost. It's like writing a phone number in 2 notebooks: if you lose one, it's in the other. There are several RAID levels, and not all aim for redundancy: some only aim for speed.

Each RAID level trades speed, space and protection. RAID 0 uses 100% of the space but survives no failure. RAID 1 and RAID 10 survive failures but use 50%. RAID 5 and 6 sit in between: 67% to 94% and 50% to 80%. It's like choosing a car: the sports car is fast but fragile, the SUV is safe but uses more fuel. You pick based on how much losing the data hurts.

Striping

RAID 0, also called striping, splits data evenly across all disks. A 2 MB file on 2 disks becomes 1 MB on each, so it reads and writes faster: both disks work at once. It's like 2 people copying a book, one the even pages and the other the odd ones. The cost: there's no copy, so if 1 disk breaks, everything is lost.

Mirroring

RAID 1, also called mirroring, stores exactly the same data on at least 2 disks. If one disk breaks, the other keeps running with everything. It's like having a printed photo and another on your phone: losing one doesn't leave you without the photo. The cost is space: with 2 disks of 1 TB, you only get 1 TB usable, 50%.

RAID 10 combines RAID 1 and RAID 0: first it mirrors the data and then splits those pairs across disks. So it's fast like RAID 0 and safe like RAID 1. It needs at least 4 disks and uses 50% of the space. It's like 2 teams of 2 people: each team copies half the book and, within a team, both copy the same thing. It survives losing 1 disk in each pair.

Parity

RAID 5 splits data like RAID 0 and also stores parity: an extra computed value that lets you rebuild what's missing if 1 disk breaks. It needs at least 3 disks. It's like knowing 3 numbers add up to 10: if you lose one, you work it out from the other 2. It uses less space than copying everything: with 3 disks you use 67%, with 10 disks 90%.

RAID 6 is like RAID 5 but with double parity: it stores parity on 2 disks, so it survives 2 disks breaking at once. It needs at least 4 disks. It's like carrying 2 spare tires instead of 1: useful if you get 2 flats on the same trip. With 4 disks you use 50% of the space; with 10 disks, 80%.

Terms in this lesson

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.

Key idea

Many disks, one team