Recovering Linux RAID Partition Data

Carlosinfl

Loves the juice
Joined
Sep 25, 2002
Messages
6,633
I found my old drive which was previously in a RAID 1 mirror. The machine and 2nd drive used for the mirror are no longer available so I would like to know if it's possible to boot from Live CD and recover the data that is on the Linux RAID partition? I used Ubuntu 9.04 to boot into a live environment and was able to see my S-ATA disk with the Linux RAID partition table however I have no idea if it's possible to mount and copy the data straight off the disk. I need many important files that I believe to be on the partition table.

Can anyone please help me?
 
You shouldn't even have to do anything special, just mount it as if it was a single disk, it should work fine.
 
I didn't think I did but something is not working. I don't have the same system any more so I can't just pop another drive in the box and have it rebuild using mdadm. I simply just want to mount the RAID 1 parition on a new system as ext4 which I know it was and copy the data to my new PC.

I get the following error:

Code:
root@ubuntu:~# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0001fd14

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       30401   244196001   fd  Linux raid autodetect

root@ubuntu:~# mount /dev/sda1 /recov/
mount: unknown filesystem type 'linux_raid_member'

root@ubuntu:~# cd /recov/

root@ubuntu:/recov# ls -l
total 0
 
Maybe try using mdadm to gain access to it.

Haven't tried myself so I don't have any detailed instructions.
 
mdadm -A -R /dev/md0 /dev/sda1

Should work. If you then want to rebuild it, just add another disk to the partial array *ONCE IT'S RUNNING IN DEGRADED STATE* with mdadm -a /dev/md0 /dev/sdb1.

Even though the partition type is flagged as RAID autodetect, if you specify the filesystem in the mount command it should mount anyway. Probably better to use mdadm though since it will update the superblock and behave correctly if the failed disk is reintroduced.
 
Back
Top