- 322,348 hits
Anything about Ubuntu, Centos, openSuSe and Fedora
Raids and LVM are very vital to a Linux server, but then again it’s one hell of a complex step recovering data from a crashed linux system. In this tutorial, I’ll try to help you recover your data on a RAID partition.
But first, let me discuss the tool I’ll be using, for this tutorial, I will use SystemRescueCD, a gentoo-based system recovery distro which for me is the far easiest tool in recovering crashed system. So back to our topic, here’s how:
1. After a clean boot on your SystemRescueCD liveCD, create your /etc/mdadm.conf
mdadm --examine --scan /dev/sda1 >> /etc/mdadm/mdadm.conf
2. Check your /etc/mdadm/mdadm.conf , it must contains something like this:
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=a28090aa:6893be8b:c4024dfc:29cdb07a
3. On the last part of that line, add the following:
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=a28090aa:6893be8b:c4024dfc:29cdb07a devices=/dev/sda1,missing
The string /dev/sda1 is the hardware device and missing means that the second disk in this RAID array is not present at the moment.
4. Now, start your raid setup
/etc/init.d/mdadm start /etc/init.d/mdadm-raid start
5. Check if the device is properly configured.
It should contain something like this:
md0 : active raid1 sda1
6. If from the raid setup, then the inner filesystem is ext3, then you just need to mount it to a temporary directory
mount /dev/md0 /mnt/recover