LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Non-bootable software RAID1 partitions also cannot be mounted (http://www.linuxquestions.org/questions/linux-server-73/non-bootable-software-raid1-partitions-also-cannot-be-mounted-564740/)

pcardout 06-27-2007 12:37 AM

Non-bootable software RAID1 partitions also cannot be mounted
 
My system partition is badly damaged from a failed OS update in Gentoo and I want to rescue my data partition
and start over without RAID.

I fully expect that my data partition is undamaged.
I have backups -- but less current than they
should be.

I tried to look at the data partition with a rescue CD, prior to copying it to another machine over the network.
I used the Debian 4 netinstall CD as a rescue CD.
All of my partitions
are visible to fdisk, but I cannot mount ANY of them.

The message in the syslog is something like

Code:

udevd error:  udev - cannot make symlink /dev/md0 File /dev/sda/md0 already exists.

udevd error:  udev - cannot make symlink /dev/md5 File /dev/sda/md5 already exists.

I am thinking that the rescue disk really doesn't like
mounting RAIDED partitions, even though I have disconnected the second drive and would be more than happy to just mount the remaining drive without mirroring.

A friend suggested I try deleting all partitions and
recreating them as ext3 (without formatting them!!).
It looked promising, though I accidently wiped all the
data, so now I am loathe to try it again on my remaining good HDD.

Suggestions? Know of a rescue CD that specializes in RAID -- or why I can't just mount my mirrored copy
of the data?

Many thanks if I can get some help with this. I am chagrinned to
be losing this data.

jschiwal 06-27-2007 01:50 AM

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?

tataiermail 06-27-2007 05:40 AM

kind of same happened to me
 
hi u posted on my thread dear,
listen, in my case my rhel wasn't by default detecting open suse raid 1.
i had to assemble to solve the problem.
but before that also i could directly mount by the individual partitions on my raid. understand?

i mean in my case /sda6 and /hda5 constituted md0.
i could not mount md0 directly, but i could mount sda6 or hda5.
no issue.
try that, and copy ur data & re format.
try it, ok?
:)

pcardout 06-28-2007 08:10 PM

Using the Debian Netinst CD to rescue failed Software RAID1
 
Quote:

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
Code:

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
Raided 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.

Then
Code:

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.

pcardout 06-28-2007 08:13 PM

Right you are!
 
Quote:

Originally Posted by tataiermail
hi u posted on my thread dear,
listen, in my case my rhel wasn't by default detecting open suse raid 1.
i had to assemble to solve the problem.
but before that also i could directly mount by the individual partitions on my raid. understand?

i mean in my case /sda6 and /hda5 constituted md0.
i could not mount md0 directly, but i could mount sda6 or hda5.
no issue.
try that, and copy ur data & re format.
try it, ok?
:)

My post above is a very long-winded way of saying that you are absolutely correct.

I was spooked because the Rescue disk by itself did not want to mount the RAIDED partitions
(perhaps protecting me?), but manually issuing mount commands from the command line worked
fine.


All times are GMT -5. The time now is 05:55 AM.