LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mdadm wont assemble (http://www.linuxquestions.org/questions/linux-newbie-8/mdadm-wont-assemble-799912/)

MrMakealotofsmoke 04-04-2010 06:12 AM

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

Quote:

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?

PenGUiN_6_1 04-04-2010 09:26 AM

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

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

mesiol 04-04-2010 11:33 AM

Hi,

sure the device is not mounted somewhere? Could you please post output of
Code:

mount
and
Code:

cat /proc/mdstat


All times are GMT -5. The time now is 08:01 AM.