Help recovering a RAID set

Rashkae ubuntu at tigershaunt.com
Fri May 11 19:14:57 UTC 2012


On 05/10/2012 05:30 PM, Liam Proven wrote:
> On 10 May 2012 21:56, Rashkae<ubuntu at tigershaunt.com>  wrote:
>> On 05/10/2012 03:47 PM, Liam Proven wrote:
>>> The RAID in one of my servers died. Sadly, so did the disk with the
>>> backup on it when I tried to recover it. As did the disk in my desktop
>>> with another backup of all the important files.
>>>
>>> So, I am trying to recover the data.
>>>
>>> I used gddrescue to get image copies of the 4 × 40GB drives; they are
>>> on a 300GB drive, as partitions sdb5, sdb6, sdb7 and sdb8.
>>>
>>> I am trying to assemble them with mdadm but it reports that there's no
>>> superblock on any of them.
>>>
>>> Looking at the raw partitions with a hex editor, I can see that there
>>> are large slices of empty space at the start of each drive.
>>>
>>> On sdb5 and sdb6, the data starts at 0xB0000. On sdb7 and sdb8 it
>>> starts at 0xAA000.
>>>
>>> Can anyone suggest how I can prune off the first  720896 bytes of the
>>> first 2 partitions and the first 696320 bytes of the second 2?
>>>
>>> I have other spare drives - I could in principle `dd` the whole
>>> partitions onto other media, but I am not fluent enough in dd to skip
>>> the first $number blocks...
>>>
>> The version of mdadm that your array was created on probably used the
>> superblocks that are store at the end of the device, not the start.  If
>> these new paritions aren't exactly the same size as the original hard drives
>> (or partitions therefof), that's why mdadm can't find the superblocks.
>> I've never recovered a raid array from such a situation, but I would think
>> the best thing to do would be the dump the partitions from the original
>> drives into a file rather than a new partition.
> One of the 3 working drives has since failed completely. This is now
> the only remaining copy of the data.
>
>

Sorry I can't offer any real help, but depending on how important this 
data is to you, I would say, your bet would be to contact Red Hat and 
say you really need some of that premium Linux engineer support they offer.

However, if I was tasked with doing something like this myself, I would 
probably try something like this.

1. dump your current partitions into files.

2.  On a new drive, zero it completely, then use madm to create a new 
raid array on a new blank partition.  I wold then examine this parition 
to see exactly where the superblock is located at the end of the 
partition.  Maybe someone on mdadm or LKML support can help you in this 
regard instead of trying to find it yourself.

3.  Find this same superblock the files created earlier, and trim the 
end of the file so the mdadm superblock is in the correct offset from 
the end of the file.

4.  Map the files to loopback devices.

5. try to coax mdadm to recognize the array and assemble it.





More information about the ubuntu-users mailing list