![]() ![]() Calculating the parity information is quite simple: you just apply a XOR operation between the data that is stored on the other 2 disks. Imagine we have 3 disks, and one disk stores the parity information for us. ![]() Let’s have a look now at how the RAID 5 parity information can be calculated. And that’s already everything that you need to know to be able to calculate parity information in a RAID 5 array. If both inputs are the same, the output of the XOR logic gate is 0. The following table shows you the truth table of the XOR logic gate: Input AĪs you can see from the truth table, the output of the XOR logic gate is only 1 if both inputs are different. An XOR gate is one of the most primitive electronic logic gates. The question is now quite interesting: how is that parity information calculated so that lost data can be recreated with it? The trick behind it is quite simple: it uses a so-called XOR calculation. That’s pretty amazing: if one of the disks in the RAID 5 array crashes, the lost data can be reconstructed using that parity information. The parity information is calculated during the writing, and can be used to reconstruct the data when one disk crashes. The following picture shows this concept. In a RAID5 array you need at least 3 disks where one disk stores the so-called Parity Information. But in today’s blog post I want to show you how the RAID 5 parity information is actually calculated, and how it can be used to reconstruct the data in the case of a failure. I have previously ranted a few times about why a RAID 5 is a terrible idea for storing your Transaction Log, and why it is also very risky to store your data files on a RAID 5 volume. ![]()
0 Comments
Leave a Reply. |