Originally Posted by jschiwal
Could you show the fdisk -l output and the command you used to try to mount md0 and md5?
What does "mdadm --detail /md0" and "mdadm --detail /md5" show?
Does cat /proc/devices show md?
Thank you LQers for responding to me in my time of need. I had five years of data on the line
that was 97% backed up, but the other 3% would have been painful to lose.
I fixed my own problem -- though the peace of mind of knowing that some of you
were willing to help let me be calm enough to think it through.
I have documented my work in case it helps other LQers. Clearly Mr Schiwal and others
don't need to read this blather. It is really the first time I've had to use a
Rescue CD in a more than trivial way and it was a matter of learning just how to do it.
AN EXAMPLE DATA RECOVERY PROBLEM
Problem: After a failed
emerge update world
made my gentoo machine unbootable I wanted to recover my data.
Data was on two independent mirrored drives in same machine (sda and sdb).
There were several partitions. I wanted /dev/md7 which was
from /dev/sda7 and /dev/sdb7.
Initially, I connected both HDDs and used the Debian etch netinstall CD
and selected rescue
I was told that none of my partitions could be mounted.
In the course of messing around, I successfully reformatted
and wiped clean /dev/sda! That was NOT my original intent!
I had had the minimal sense to disconnect /dev/sdb from the
machine, so my foolishness with /dev/sda still left me with
an intact copy of all my data. However, it increased the pressure!
Now that I had a spare clean drive,
I installed a good Debian desktop system on /dev/sda and got it running.
I kept the same partition sizes I had on my last system, but
did not turn on RAID.
After getting over my panic, I thought more carefully through
what it would take to rescue the data on /dev/sdb. I recalled that in
software RAID, the original (unRAIDED) devices can be mounted.
Obviously writing to one or the other desynchronizes the RAID, but
if you are in a data recovery situation, you do not care.
I again booted from netinstall CD. Immediately
after boot finished, and before answering any questions
(like "Rescue Language", "network setup"), I did an Alt-F2
to get to another console running busybox.
mkdir /brokenpart1; mount /dev/sdb1 /brokenpart1 #partition 1 was my root partition /
mkdir /brokenpart7; mount /dev/sdb7 /brokenpart7 #partition 7 was my /home partition
mkdir /goodpart1; mount /dev/sdb1 /goodpart1 #partition 1 is / on the new system
mkdir /goodpart5; mount /dev/sdb1 /goodpart5 #partition 5 is /boot on the new system
mkdir /goodpart7; mount /dev/sdb1 /goodpart7 #partition 7 is /home on the new system
cd goodpart7; cp -a /brokenpart7/* .
cd goodpart5; mkdir brokenroot; cd brokenroot; cp -a /brokenpart1/* .
This left me with all my /home directories restored, a working system, and a copy of
my old system in case I want to refer to contents of my /etc and /var directories
down the line.
This whole problem was trivial. The thought that I was using RAID made me superstitious.
What others should know is that (if it's SOFTWARE RAID and it's also Mirrored data (not
striped data)) either of the mirrored drives can be mounted as ordinary drives with a rescue CD,
whether or not they are still bootable.