Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-04-2010, 07:12 AM   #1
Registered: Apr 2010
Posts: 30

Rep: Reputation: 1
mdadm wont assemble

hey all,
i setup a mdadm raid5 array with an lvm ontop of it. I then put a 400gb onto the array. Then when i restarted the server 1 of the drives converted to a spare and i have no data on the drive (or so it seams). I have tried

mdadm --assemble --force --update=resync /dev/md1 /dev/sde1 /dev/sdg1 /dev/sdh1
but it says
mdadm: device /dev/md1 already active - cannot assemble it

so i try to stop it with --stop but it says mdadm: fail to stop array /dev/md1: Device or resource busy

so how can i make this spare drive into the main drive and hopefully get my data back?
Old 04-04-2010, 10:26 AM   #2
Registered: Oct 2006
Location: Brunswick, MD
Distribution: gNewSense 2.3 (deltah) i386
Posts: 57

Rep: Reputation: 22
I am only guessing, but maybe try to see if there is, in mdadm, a command to scan and activate. THEN see about the LVM (if the md partition is type LVM, you may need to activate the md device first, then type the following:
vgscan --mknodes
# if the vgscan thing has already been done, type...
vgchange -ay
I once thought I LOST the setup on my drive, but I did not, so, it may be the data is still there. Maybe the assemble command is used for creation, and you just need to say 'Hey, activate this please'. I would advise you READ THE MANUAL PAGES so you can be ABSOLUTELY sure, because, like I said, I thought I LOST my partition completely. If this does not help, sorry. Hope it does
Old 04-04-2010, 12:33 PM   #3
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137

sure the device is not mounted somewhere? Could you please post output of
cat /proc/mdstat


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
How do I get mdadm to assemble a raid using local and nbd devices adrian_stephens Linux - Server 3 05-29-2009 11:42 AM
mdadm array doesn't assemble seaking1 Linux - Software 8 03-06-2009 10:34 AM
mdadm fails to assemble reconnected drives (debian, raid0) SandRock Linux - Software 12 11-09-2008 01:06 PM
mdadm assemble weirdness with partitionable RAID0 Schneckl Linux - Software 0 08-28-2007 06:45 PM
mdadm fails to assemble my RAID device tomhildebrand Fedora 6 06-28-2007 01:08 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:36 AM.

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