LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-27-2007, 12:37 AM   #1
pcardout
Member
 
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("jessie", "squeeze"), Linux Mint (Serena), XUbuntu
Posts: 221

Rep: Reputation: 24
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.
 
Old 06-27-2007, 01:50 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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?
 
Old 06-27-2007, 05:40 AM   #3
tataiermail
Member
 
Registered: Apr 2006
Location: calcutta, IND
Distribution: RHEL AS 4, openSUSE 10.2
Posts: 48

Rep: Reputation: 15
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?
 
Old 06-28-2007, 08:10 PM   #4
pcardout
Member
 
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("jessie", "squeeze"), Linux Mint (Serena), XUbuntu
Posts: 221

Original Poster
Rep: Reputation: 24
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.
 
Old 06-28-2007, 08:13 PM   #5
pcardout
Member
 
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("jessie", "squeeze"), Linux Mint (Serena), XUbuntu
Posts: 221

Original Poster
Rep: Reputation: 24
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.
 
  


Reply

Tags
data, mdadm, raid1, recovery


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Recover Data From RAID1 LVM Partitions With Knoppix Linux LiveCD LXer Syndicated Linux News 0 04-24-2007 04:01 PM
e2fsck: root partitions and ro mounted partitions Clemente Linux - General 4 11-06-2006 09:32 PM
Software RAID1 and udev bujecas Debian 2 10-31-2006 04:35 AM
Software RAID1 with mdadm bujecas Debian 0 10-26-2006 09:56 AM
2 partitions - only one bootable Geminias Linux - General 6 07-16-2006 08:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration