crotchety
adj - subject to whims, crankiness, or ill temper

I use Gentoo Linux both at home and at work. Every so often I hit some snag and I'd like to detail the fix here both for my benefit and to possibly help anyone else having a similar issue.

Sunday, February 17, 2008

dmraid != kernel raid

I didn't mention it in the previous post about migrating to hardened gentoo, but initially when I went to re-add the drive back to the mirror I was getting some errors and it wouldn't let me. mdadm told me this:
mdadm: Cannot open /dev/hde1: Device or resource busy
I got similar output trying to add hde3 back to /dev/md3. Those partitions are only used for raid so it was really bothering me that it said they were in use. I googled around a bit and found a reference to the device mapper (which starts up on bootup for me because I use LVM) creating some devices based on a motherboard raid controller. You can get a listing of what the device mapper has created using dmsetup ls. I ran the command and sure enough there were 4 devices listed starting with nvidia_. I was able to remove 3 of the 4 using dmsetup -C but one was saying it was busy and in use and I still couldn't add the partitions to the raid. So I went back and edited grub.conf to remove dodmraid from the kernel line and restarted the system. After it came back up I was able to hot add the 2 partitions and get the mirrors back up and running in a non-degraded state. Also, dmsetup ls now only shows my LVM VGs. I went back and edited my genkernel.conf to tell it to stop adding dmraid support to my initrd in the future.

No comments: