For the example, we have 3 disks. One disk holds the parity information, the other two the data (thus you lose 1 disk worth of space to parity). Now, for every bit the parity is calculated, such that all of the disks contain always an even number of bits at the same position. (This example is the basic theory, the implementation might differ slightly):
Data 1 Data 2 Parity
0 0 0
0 1 1
1 0 1
1 1 0
If you lose one disk and have now (for this position on every disk) the information 1?1
you know, that the ?
must be 0
because you have to get an even number of bits. Same for e.g. ?00
(==000
) or any other combination, also with more data parts (works the same also for 20 data and 1 parity disks). Also long as you lose only any one disk (one bit per parity group), you're fine.
Note: The position of the parity rotates (with RAID-5) over the disks for every stripe (RAID block, something between 2k and 64k bytes), to spread the load on the disks evenly.