edit · history · print

Recoverying from a RAID messup after power loss

Boot the system up from a rescue image. Then investigate the system:

mdadm -Ebsc partitions

mdadm -E /dev/sda1

...

Try to figure out if it's just one disk that's gotten out of sync, if yes, then you're in luck. Recover the raid's with:

mdadm -Ac partitions -m 0 /dev/md0

mdadm -Ac partitions -m 1 /dev/md1

...

if needed add the -f option (i.e. for raid5 that has 2 out of 3 disks available)

now if you had logical volumes check those

lvm lvscan

Activate them to get them in the /dev/ tree

lvm vgchange -ay

And now fsck everything you can. If things look good and the faulted disk is just out of sync due to the power loss, then add it back

mdadm /dev/md0 -a /dev/sdc1

...

wait for the raid to sync itself

cat /proc/mdstat

Reboot...

edit · history · print
Page last modified on May 13, 2011, at 02:34 PM