You are not logged in.

#1 2010-06-07 13:50:22

fnbisson
Member
Registered: 2008-01-16
Posts: 9

Unable to add partition on raid array, device or resource busy.

Greetings,

I want to be able to create a disk image of a software raid of one of my arch box.

I'm able to create my image with G4U successfully. I'm also able to restore my image without error on my new box.

When my system boot up, I make sure that my raid array are up by doing cat /proc/mdstat.

I can see that md1 and md2 are 2 of 2 and active raid 1. But, when I look at md0 this is what I got:

md0 : active raid1 sdb3[1]
           6289344 blocks [2/1] [_/U]

I try to add the partition sda3 to md0 array with this command:
mdadm --manage /dev/md0 --add /dev/sda3

The output of this command give me this :
mdadm: Cannot open /dev/sda3: Device or resource busy.

It seems that this error only occurs on /dev/md0 (/) array. I'm 100% sure that both, my image and my drive (vmware hdd) are good.

This is my partition table:

/dev/sda1 /dev/sdb1 = /boot (md1) 100MB
/dev/sda2 /dev/sdb2 = swap (md2) 2048MB
/dev/sda3 /dev/sdb3 = / (md0) 8GB

I have also tried the image creation with Acronis... same error.

Offline

#2 2010-06-07 15:31:52

fnbisson
Member
Registered: 2008-01-16
Posts: 9

Re: Unable to add partition on raid array, device or resource busy.

I just found something...
In /boot/grub/menu.lst this is what I have :

kernel /vmlinuz root=/dev/sda3 ro

So when my system boots up.. it boots on /sda3 and it's probably for this that I can't mount my /dev/sda3.

I try to replace /sda3 for /sdb3 in my menu.lst.

When I cat /proc/mdstat I saw that this time /dev/sdb3 is missing.. and I still can't add it to my md0 array.

If I replace /dev/sdb3 or sda3 for md0 in my menu.lst, I have a kernel panic on boot.

Offline

#3 2010-06-07 15:52:05

fnbisson
Member
Registered: 2008-01-16
Posts: 9

Re: Unable to add partition on raid array, device or resource busy.

I solved my issue.

My menu.lst was wrong..

kernel /kernel26 root=/dev/md0 ro

I should add this to my menu.lst:

kernel /kernel26 root=/dev/md0 ro  md=0,/dev/sda3,/dev/sdb3

Now it work.

I followed the archlinux raid guide who's telling this:

Nowadays (2009.02), with the mdadm hook in the initrd it it no longer necessary to add kernel parameters concerning the RAID array(s).

Which is wrong because my distro is 2009.02, if someone can add a note to the wiki it can be usefull.

Thanks for your support

Offline

Board footer

Powered by FluxBB