With the principle of parity, a parity block is generated from the blocks of user data by XOR operations. In the case of RAID 3 (byte level) and RAID 4 (block level), this is stored, for example, on a separate (dedicated) hard disk (parity disk) of the network; in the case of RAID 5, distribution is carried out equally on all hard disks involved, with RAID 6 the parity information is created twice across all hard drives. If a block with user data is lost, it can be recovered using the parity block.
As an example:
Information one: 9
Information two: 14
Information three: 21
Information four: 38
Parity: 82
9 + 14 + 21 + 38 = 82
If one of the four pieces of information is now lost, the missing original information can be recovered with the parity and the other information:
Information one: 9
Information two: 14
Information three: 21
Information four: 38
Parity:: 82
82 - (9 + 14 + 21) = 38
This means that both RAID 3, RAID 4 and RAID 5 can cope with the failure of a hard drive without the RAID failing. Due to the double parity with RAID 6, even the failure of two data carriers is manageable.
Common RAID level: