TechKnowSurge
VideoSecurityFree

RAID 5

RAID 5 combines the performance and capacity benefits of striping with fault tolerance through distributed parity, allowing a storage array to survive the loss of one drive without losing data. It requires a minimum of three disks and uses an XOR-based parity system to enable full drive reconstruction.

Complete this video to capture a CTF flag worth 1 point.

About this video

RAID 5 is a storage configuration that addresses the core limitations of both RAID 0 and RAID 1. RAID 0 improves speed and capacity through striping but offers no protection against drive failure, while RAID 1 provides redundancy through mirroring but sacrifices capacity and does not improve performance. RAID 5 combines striping with distributed parity to achieve improved speed, expanded usable capacity, and fault tolerance within a single array. A minimum of three disks is required, and the configuration scales to larger arrays while maintaining its core protective properties. In any configuration, the array can sustain the complete failure of one disk without any data loss, and the failed drive can be replaced and rebuilt automatically. RAID 5 distributes parity across all drives in the array rather than dedicating a single disk to it. As data is written in blocks across the disks, a corresponding parity block is calculated using an XOR function and written to a different disk for each stripe. XOR compares bits from the data blocks and produces a result that makes reconstruction possible when a drive is missing. If a disk fails, the system uses the remaining data blocks and the stored parity to recalculate and restore every missing bit. This rotating parity scheme prevents any single disk from becoming a bottleneck, which preserves the performance advantages of striping while ensuring that usable storage and fault tolerance are both maintained across the entire array.

What you'll learn

What's covered

RAID 5

Key terms

RAID 5
A RAID configuration that stripes data and distributed parity across three or more drives, providing read performance gains and the ability to survive the failure of any single drive.
Striping
A RAID technique that splits data across multiple drives sequentially to improve read and write performance.
Parity
Calculated redundancy data stored across drives in certain RAID levels that allows the array to reconstruct lost data mathematically if a single drive fails.
Fault Tolerance
A design property that allows a system to continue operating correctly even when one or more of its components fail, achieved through techniques such as redundancy and failover.
Exclusive Or
XOR
Exclusive Or is a fundamental Boolean and bitwise operation used extensively in cryptographic algorithms and stream ciphers for combining key material with plaintext.
Redundancy
The duplication of critical components or systems to increase reliability and availability.

Topics

Raid 5 Raid Storage Systems Fault Tolerance Data Striping Parity Xor

Transcript

With RAID 0, we increase the performance and capacity of our drives. However, there's no fault tolerance, so if one of those drives dies, we lose our data. With RAID 1, we are now mirroring that data, so we have fault tolerance and redundancy within our data. However, the problem is that it doesn't increase the speed of those drives. With RAID 5, we actually have both of those.

Striping plus parity

RAID 5 does striping just like RAID 0, and we know striping increases the performance and capacity of a drive or a volume. But what we also have with this is parity, which gives us some ability to lose a drive but not lose our data.

So just like RAID 0, we're going to write the first block of data to the first disk, the second block of data to the second disk, and then we're going to write a block of data that's the parity bits.

How the parity bits work

How do these parity bits work? It does depend on the RAID configuration that we have, so we're just going to take a look at RAID 5, which uses an XOR function. We don't need to be too concerned about an XOR function, but essentially, if we're comparing bits here, we have a bit zero and zero. Those are the same, and so we're going to say a zero. And down here at the bottom, one and one will be a zero as well. But if we have different bits, 0 1 or 1 0, those are going to be ones in the parity bit.

Now, if we were to lose half of the bits and not know what they were, we could recreate that. Here we have a zero, and we know that the second bit is going to be the same because we've got a zero in the parity section, so that's going to be a zero. Here we have another zero, and we know that the parity bit is different — it says it's different — so this is going to be a one. Here we have a one, and once again we are going to be different, so that's going to be a zero. And then we have a one right here on the first disk, and this is a zero, so we know that they are the same, so this will be one.

We can recreate what this column of bits has. Well, your disks do the same thing: the parity bit allows us to recreate that data.

Where the parity is stored

The way RAID 5 stores these parity bits is kind of interesting. It starts out with the first block, which is A1, then the second block, which is A2, then the third block, which is A3, and then it figures out what the parity bit is and creates that on disk 4. Now the second block of data that we have, B1, B2 and B3 — the parity bit gets stored on disk 3. And then we have C1, C2 and C3, and the parity bit gets stored on disk 2.

You can see that the parity bit shifts as it goes along. So we see it, and then it resets and shifts again, so it starts back over here, and so on and so forth. We see it shift and use different disks for those parity bits.

What we've accomplished

So what have we accomplished by doing this? Since we're striping across many disks, we increase the speed and the capacity of those disks, so we can write and read faster. But what else have we done? Because of the parity bits, we also have created fault tolerance, and now we could lose one disk and still be fine.

This works on many variations of disks. We do have to have at least three disks for RAID 5, but we could have four disks or five disks. In any one of these scenarios, we could lose one of the disks, but then rebuild that disk.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →