How RAID Reconstruction Works in RAID-5
RAID-5 is one of the most popular forms of RAID, and it’s not hard to see why. When you combine three or more hard drives into a RAID 5 array, you get three benefits. First, the hard drives combine to form a single storage volume, with greater capacity than a single drive all by its lonesome. Second, the multiple drives working in unison deliver faster performance (not SSD level, but better than one solitary hard drive). And third, RAID 5 uses parity data to provide redundancy in case one drive fails.
A RAID 5 array breaks up all of the data you write to it into blocks and “stripes” these blocks across the disks. A single stripe of data contains as many blocks as there are disks in the array. But of these blocks, one in particular is special. The special block includes “parity” data, created by running XOR calculations against the bits in all the rest of the blocks. When you have a list of several values, the XOR function “fills in the blanks” if one of those values goes missing. The XOR function is actually easy to learn and quite fun to do—you can learn it as a party trick (or rather, a “parity” trick) to impress your friends. If you go to those kinds of parties, that is.