Parity
Parity is a value calculated from a set of data blocks and stored with them, so that any one missing block can be worked out again from the others.
In RAID 5, parity is computed across the blocks of one stripe with exclusive-or (XOR). If one block in that stripe can no longer be read, it can be recalculated from the parity and the other blocks. RAID 5 also spreads its parity blocks across all the disks rather than keeping them on one.
How does parity rebuild a missing block?
Parity rebuilds a missing block with XOR: combining everything that remains in the stripe gives back exactly that block, because all the data blocks and the parity block of a stripe combine to zero. This works for one missing block per stripe. With two missing, single parity cannot tell them apart.
What happens to parity when a disk fails?
Every read of the failed disk’s blocks becomes a calculation from all the other disks. The array is then a degraded array with no redundancy left. Recovery of a failed RAID 5 array is covered on the RAID 5 data recovery page.
Related terms
Common misconceptions
Is parity a copy of my data?
No. Parity is a calculated value, not a second copy. It can restore a missing block only while the other blocks in the stripe can still be read. It is updated with every change to the data, so it cannot undo a deletion or a format.