LVM on top of RAID5 > grow

This week I installed opensuse 11.1rc1 op my old box, which I am reconfiguring to act as a NAS.

I had a 750GB hdd, filled with data. I bought 3 new 750GB drives, created a RAID5 array with 3 drives and on top of that LVM.

When I had done that, I came across some problems which I solved with help of google (raid5 is always created in degraded mode and you have to re-add one of the drives to rebuild the entire array).

My next move was to copy the contents of my old hdd to the raid array. After that I repartitioned the old drive and added it to the array (mdadm /dev/mdx -a /dev/sdXX).
My next move would be to grow the array with the new hdd attached (mdmadm --grow /dev/mdX --raid-devices=4). This just wont budge! It always says the drive is in use (cannot set device size/shape of /dev/mdX: device of resource busy).
I figured that maybe the LVM keeps the drive locked so I used “lvchange <map> -a n” to release the array (and also tried to disable /etc/init.d/boot.lvd), but still to no avail.

I’ve checked the current kernel config and MD_RAID5_RESHAPE=y is set…

Any suggestions? I’m running out of ideas :’(


nobody? :frowning:

Hm, after fiddling around for ages I just found the solution. So for future porposes…


  • remove the internal bitmap (e.g. mdadm --grow /dev/mdX -b none);
  • grow the raid array (e.g. mdadm --grow /dev/mdX -n4);
  • re-add the internal bitmap (e.g. mdadm --grow /dev/mdX -b internal).