LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 06-25-2007, 02:22 AM   #1
tomhildebrand
LQ Newbie
 
Registered: Jun 2007
Posts: 3

Rep: Reputation: 0
mdadm fails to assemble my RAID device


My Fedora FC6 system has 3 RAID devices
md0 RAID1 hosting the /boot filesystem
md1 RAID5 hosting the / filesystem
md2 RAID5 hosting the /usr2 filesystem
md0 recently failed with one bad disk preventing me from booting up. Instead of working around the single failure it gives me "cannot start dirty degraded array for md1". But it doesn't matter, I wanted to re-image anyway. But I would like to get my md2 back (700GB of precious files). When starting the machine with a Knoppix livecd, the disk partitions making up md2 (/dev... hda2 hdc2 hde2 hdg2) appear to be healthy, but mdadm fails to assemble the array.

root@Knoppix:/# mdadm --assemble --scan
mdadm: error opening /dev/md0: No such file or directory
mdadm: error opening /dev/md2: No such file or directory
mdadm: error opening /dev/md1: No such file or directory

I read in another thread that I should manually create /dev/md2, but that didn't help.
root@Knoppix:/# mknod /dev/md0 b 9 0
root@Knoppix:/# mknod /dev/md1 b 9 1
root@Knoppix:/# mknod /dev/md2 b 9 2
root@Knoppix:/# ls -al /dev/md*
brw-r--r-- 1 root root 9, 0 Feb 21 21:19 /dev/md0
brw-r--r-- 1 root root 9, 1 Feb 21 21:19 /dev/md1
brw-r--r-- 1 root root 9, 2 Feb 21 21:19 /dev/md2
root@Knoppix:/#
root@Knoppix:/# mdadm --assemble --scan
mdadm: error opening /dev/md0: No such device or address
mdadm: error opening /dev/md2: No such device or address
mdadm: error opening /dev/md1: No such device or address

Any help would be greatly appreciated.
 
Old 06-25-2007, 09:10 AM   #2
fayez
Member
 
Registered: Aug 2004
Location: Amman
Distribution: Red Hat
Posts: 50

Rep: Reputation: 15
try this one:

root@Knoppix:/# mdadm --assemble /dev/md2 /dev/hda2 /dev/hdc2 /dev/hde2 /dev/hdg2
 
Old 06-26-2007, 12:11 AM   #3
tomhildebrand
LQ Newbie
 
Registered: Jun 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your help. But it's still not working. Here's what I get:

Code:
root@Knoppix:/# mdadm --assemble /dev/md2 /dev/hda2 /dev/hdc2 /dev/hde2 /dev/hdg2
mdadm: error opening /dev/md2: No such device or address
But strangely, /dev/md2 seems to exists
Code:
root@Knoppix:/# ls -al /dev/md*
brw-rw---- 1 root disk 9, 2 Jun 25 18:08 /dev/md2
So I tried something suggested in another thread:
Code:
root@Knoppix:/etc/init.d# mdadm --examine --scan /dev/hd*2 >/etc/mdadm/mdadm.conf
root@Knoppix:/etc/init.d# cat /etc/mdadm/mdadm.conf
ARRAY /dev/md2 level=raid5 num-devices=4 UUID=e46f59e0:9cdca28f:f98ddb8f:1d0eb62c
root@Knoppix:/etc/init.d# /etc/init.d/mdadm start
root@Knoppix:/etc/init.d# /etc/init.d/mdadm-raid start
Assembling MD arrays...done (disabled in /etc/default/mdadm).
root@Knoppix:/etc/init.d# cat /proc/mdstat
cat: /proc/mdstat: No such file or directory
So, still no RAID array according to /proc/mdstst.
More alarmingly: Why is there no /proc/mdstst at all?
Is the RAID service not running? Should I start it manually? How?

Any ideas?

Thanks.
 
Old 06-26-2007, 06:20 AM   #4
fayez
Member
 
Registered: Aug 2004
Location: Amman
Distribution: Red Hat
Posts: 50

Rep: Reputation: 15
Then the md driver did not loaded, try to load the md driver again,

now I cann't remember the commands I am sorry....
 
Old 06-26-2007, 06:34 AM   #5
fayez
Member
 
Registered: Aug 2004
Location: Amman
Distribution: Red Hat
Posts: 50

Rep: Reputation: 15
I think the commands:

# lsmod
to list loaded modules, and
# modprobe md
to load the md module

try it out..........
 
Old 06-27-2007, 12:14 AM   #6
tomhildebrand
LQ Newbie
 
Registered: Jun 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Fayez,
THANK YOU, THANK YOU, THANK YOU !

That did it.
I couldn't imagine that the kernel module for the md driver wouldn't be loaded when Knoppix starts, but it isn't. Loading the md kernel module per your instructions solved that problem, I can see /proc/mdstat and all the md commands work. Most importantly: I got my files back.

Thanks again.
 
Old 06-28-2007, 12:08 AM   #7
fayez
Member
 
Registered: Aug 2004
Location: Amman
Distribution: Red Hat
Posts: 50

Rep: Reputation: 15
Any time man, and remember we all use this useful forum to help each other...
 
  


Reply


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
Why can't I mount this md0 raid? (mdadm and software raid) cruiserparts Linux - Software 35 01-05-2013 03:35 PM
[SOLVED] Lilo fails with root on raid 1 device cjcone Suse/Novell 1 06-15-2010 03:04 PM
RAID through mdadm rosey Linux - Server 5 04-08-2007 11:57 AM
preserving old /dev/md0 - mdadm problem with --create/--assemble tiainte Linux - Kernel 2 03-11-2007 05:58 AM
Mdadm Raid question stefaandk Linux - General 12 08-16-2005 02:11 AM


All times are GMT -5. The time now is 07:09 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration