LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-12-2007, 04:15 AM   #1
tiainte
LQ Newbie
 
Registered: Jan 2007
Posts: 2

Rep: Reputation: 0
preserving old /dev/md0 - mdadm problem with --create/--assemble


Hardware:

/dev/hda blew up, so root FS gone and fresh install, and i'd really like to keep stuff from /dev/md0.
/dev/md0 used to be /dev/hdh + /dev/hdg on raid 1 on earlier system where /dev/hda blew up.

Situation:

Ran Ubuntu 6.10 Desktop CD,
tried to move files from forementioned hdh+hgd raid1 to new disk /dev/sda1 to use hdh+hdg as / in future.

apt-get install mdadm, as it wasnt on live cd otherwise
accidentally typed "mdadm --create /dev/md0 --level=1 --raid-disks=2 /dev/hdh1 /dev/hdg1"

Problem is that create - it should have been --assemble
I noticed my error at about 14% of re-syncing of raid, and didnt dare to stop it.
I let it run to 100% and it completed succesfully.

Mount doesnt work, it gives :
mount -t ext3 /dev/md0 /tmp/test
mount: wrong fs type, bad option, bad superblock on /dev/md0,
missing codepage or other error

mdadm says superblock is persistent.

On other hand /dev/hde1 is a single, primary partition with ext3 and it hasnt been altered in anyway way, and i cannot mount that either for some weird reason. Gives the same error as above.

I _think_ i did hdh1 and hdg1 as FD-partitions and i would very much like to get data out from them

Next thing i'm planning to do is do a fresh install to /dev/sdb - install proper kernels etc and start examining situation more closely without booting from livecd any more.

Main objective - to get as much stuff as possible from hdh/hdg out to any other device

Any help, suggestions and precautions you have in mind - please donate
 
Old 03-09-2007, 10:27 AM   #2
minuo
LQ Newbie
 
Registered: Mar 2007
Posts: 1

Rep: Reputation: 0
tiainte,

Have you gotten anywhere with this? I find myself in a very similar situation and thus far your post is the closest I've found via google.

If you or anyone has tips on recovering from an accidental --create I would be most appreciative!

--minuo
 
Old 03-11-2007, 05:58 AM   #3
tiainte
LQ Newbie
 
Registered: Jan 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by minuo
tiainte,

Have you gotten anywhere with this? I find myself in a very similar situation and thus far your post is the closest I've found via google.

If you or anyone has tips on recovering from an accidental --create I would be most appreciative!

--minuo
Actually - i got every single bit of data out from there, and the rebuild went nicely trough with all the data intact.

Lesson learned:
Do not, DO NOT, use any kind of craplivecd's to do any kind of examinations, they usually lack something really relevant like mdadm, smbfs or maybe even cfdisk. Most of the problems i had were because of that crapbuntu liveCD that didnt have all the stuff i needed. Mounting problems were gone that instant i booted with new-enough kernel with all the tools i needed.

In my case, accidental --create didnt create or destroy anything, it just "rebuilt" something. I did fresh install to new /dev/hda - installed everything needed, and rebooted. Then mounted /dev/md0 and voilá - data was there.

Now i have "ghost" /dev/md2 with /dev/hdh (NOT /dev/hdh1) which delays my boot times, but that's a minor nuisance
/dev/md0 and /dev/md1 are working nice & smooth atm.
 
  


Reply

Tags
ext3, harddisk, mdadm, raid



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
Why can't I mount this md0 raid? (mdadm and software raid) cruiserparts Linux - Software 35 01-05-2013 03:35 PM
RAID5 using mdadm, how to mount /dev/md0? ggduff Linux - Software 4 11-14-2007 01:59 AM
Umounting /dev/md0 still in use vasek125125 Linux - Software 12 08-04-2006 08:21 AM
mdadm: no devices found for /dev/md0 humbletech99 Linux - General 2 06-19-2006 04:28 AM
can not mount RAID 0 /dev/md0 dysenteryduke Linux - Software 3 09-15-2005 03:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:20 PM.

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