Understanding Parity Calculation. In introduction to RAID concepts, we started looking at parity. Here’s a more detailed explanation.
In array five array, any single disk can fail without data being lost, as the contents can be rebuilt from parity information, distributed between the other drives. The simplest method of calculating parity data uses the exclusive OR or XOR operator.
XOR evaluates two inputs and outputs 0 if they match, and 1 if they don’t. For a series of operations, count the number of 1 inputs. If the number is odd, the output is 1.
If the number is even, the output is 0. Let’s work through a simulation of a drive failure and replacement. Start with three drives filled with data. Then calculate the parity bits.
In a real array, these would be distributed amongst the drives. If we remove one drive to simulate failure, we can reproduce the contents by applying the XOR operator to the surviving disks and parity bits.
RAID Six extends this, as well as a simple XOR, it performs a second parity calculation based on both the stripe data and the first parity bit. This allows the array to survive the loss of any two drives.
Thanks for watching.