Scenario: two or more HDs configured as RAID1. One of them gets broken and the computer doesn’t boot for any reason.
Problem: access data in the partition to recover them. It is not possible to mount it directly because it is a RAID partition, so:
- Create an image of the good disk using
ddand secure it
- Take another pc with debian/ubuntu (or similar distro)
- Using an usb<->sata adapter, plug the disk in the new computer and make note of the device checking the output using
- Verify with
fdisk/cfdiskthe partition table of the disk: there should be one or more
Open a terminal and type
$ mdadm --assemble --run /dev/md0 /dev/sdc1
to create a temporary RAID1 and to make it available using
If it doesn’t work, maybe the RAID kernel module is not loaded.
$ modprobe raid1
and try again
If everything is OK, it will be possible to mount
$ mount /dev/md0 /mnt
If the above command gives back
invalid argument, likely the ext3 module is not loaded.
$ modprobe ext3
and try again
- If mount hasn’t given back any error, it will be possible to mount to access data in the raid1 from
- Save all you can save
Stop the temporary raid1 using
$ mdadm --stop /dev/md0
If necessary, repeat the same process with the other partitions
$ mdadm --assemble --run /dev/md1 /dev/sdc2
WARNING: if you have a RAID5, this procedure won’t work.
Many thanks to Lorenzo