Recovering data from RAID1 drive

1

I have recently received one of the two 1TB drives I had on a dedicated server. The drives were mirrored and the server was running CentOS 5.6.

I've installed it in an USB enclosure and tried mounting under Ubuntu to copy some files, but surprise, it won't mount.

fdisk -l says /dev/sdb does not contain a valid partition table

mount /dev/sdb /media/usb says unknown filesystem ddf_raid_member

if I dd for the first 1024 bytes i can see some strings that belong to the GRUB boot loader.

What could I do to recover my data?

Nick M

Posted 2012-07-31T16:05:38.770

Reputation: 111

Answers

0

Sadly I could not afford trying to restore the partitions which were also damaged, so I had to run testdisk to recover my data. It took about 4 days but managed to get it all back.

Nick M

Posted 2012-07-31T16:05:38.770

Reputation: 111

1

I expect the drive will have RAID metadata at the start which prevents it being recognized as a normally formatted non-RAID disk.

You may be able to use mdadm to gain access to the filesystems. I'd practice with a spare drive.

RedGrittyBrick

Posted 2012-07-31T16:05:38.770

Reputation: 70 632

I've added the drive as raid level 1 to /dev/md0 and still cannot mount it, it keeps saying there is no valid partition table/no valid superblock. Have looked for backup superblocks, found some, tried restoring, but it won't do it. – Nick M – 2012-07-31T22:30:18.367

1

I ran into this issue as well. It appears Dell's disk utility (this old poweredge 2950) will mark drives as ddf_raid_member EVEN if the drive was not in RAID, but just set up as disk group all by itself.

If this is the case - you can use /dev/mapper to help. In my case:

 media]# blkid
/dev/sda2: UUID="00873ee1-8682-4aaa-991d-351aa2c9af85" TYPE="ext4"
/dev/sda1: UUID="46a173bd-bfbe-4dc5-9249-ccece83f8014" TYPE="swap"
/dev/sdb: UUID="Dell    ^P(" TYPE="ddf_raid_member"
/dev/mapper/ddf1_SSDp1: UUID="c1c17084-601d-4c28-9851-55657fc767d7" TYPE="ext4"
/dev/mapper/ddf1_SSDp2: UUID="fe20a9cf-6cbe-4c1d-a980-054bf2a78bc8" TYPE="ext4"

So, if I wanted to mount /dev/sdb - instead of: mount -t ext4 /dev/sdb1 I did mount -t ext4 /dev/mapper/ddf1_SSDp2 /mnt/mymountpoint and I can get to the disk. Hope this helps someone in a similar situation. My guess if the drive was in an actual raid setup this wouldn't work (though mdadm might).

Ross

Posted 2012-07-31T16:05:38.770

Reputation: 111

Kind of gave up on local storage since this happened as I wasted a whole week restoring the data back then. The whole thing gave me the creeps while it lasted. I'm using AWS storage now and although slower for large transfers, at least I know there won't be any issues with failures and such. – Nick M – 2014-08-03T23:27:55.783