Raid 5 Data Recovery,

Retrieving Data from a Broken RAID 5 Array
RAID 5 requires a minimum of three drives. Data is stored in stripes of a specified block size. In some ways it is similar in configuration to RAID 0 however The biggest difference is that RAID5 has redundancy built-in. Redundancy means that if a single drive fails, then the data can be recovered from the working hard disks in the array. The redundancy is in the form of a parity block, using a three drive array as an example, redundancy for the first stripe would be calculated by taking each byte from each block from the first two hard disks, then XORing these values to give. It is this value that is stored in the parity block for the current stripe. So, if a drive fails, the missing value can be regenerated or rebuilt by XOR-ing the remaining two values. This does increase write times slightly as the parity needs to be rebuilt.

Rebuilding a RAID 5 Array After Failure
The difficult part for data recovery technician is working out the original drive order, block size and parity rotation algorithm.

There are many permutations and these are compounded by the number of drives in the array. For example if you have a RAID array with 5 drives there are 120 permutations of drive order alone. Then there is the block size to take into account. These are not as complex to calculate, but can be any size from 2048 bytes upwards. However, the most common sizes are 32kb 64kb, 128kb and 256kb.

Once drive order is determined the next thing is to calculate the parity rotation. What this means is, that for each complete stripe, the parity block moves to the next drive in the sequence. As an Example, if you take 3 drives and number them 0,1 and 2 below is a diagram indicating where the data blocks are (shown as numerics) and the Parity block (P).

Drive 0: 1 3 P 7
Drive 1: 2 P 5 8
Drive 2: P 4 6 P

You can see that the first parity block is on drive 2. The next one is on drive 1 and final one is on drive 0. Then the sequence repeats itself until the end of the array.

Initially this looks fairly straightforward, and in fact the above is the simplest RAID 5 there is.

here is another type of parity (Backward with continuous data)

Drive 0: 1 4 P 7 10
Drive 1: 2 P 5 8 P
Drive 2: P 3 6 P 9

Did you notice the difference? Blocks 3 and 4 (and 9 and 10)are inverted. This is because once the first stripe is complete. The first data block of each stripe must go immediately after the parity block so the drive reads the data as 0,1,2,0,1,2… So in this case block 3 is placed after the parity block on the second stripe. This balances out reads so that the same hard disk is not read twice successively. A mistake in determining the block[spin/] rotation will result with corrupt data.

Data Recovery Services
When fully understand the technologies employed in RAID of any level. Comprehensive understanding of how data is stored on disk is essential if the data is to be recovered correctly. MjM Data Recovery Ltd have developed proprietary software that they use for RAID data recovery and have engineers that are able to recover from the most difficult of jobs. If another data recovery company has already announced that the data is unrecoverable, it is always worth sending it to another company for a second opinion. Most will not charge for a diagnosis or it will be a relatively small charge if the value of the data warrants the cost.

Leave a Reply