I was setting up a server recently and I was using KVM to virtualise a whole lot of hosts. Being fairly unimaginative I decided to call the machine kvm. As usual I used LVM for the disks. Now on Ubuntu this means that by default the VG will be called the same as the host name. This means the root LV will appear on the system as /dev/kvm/root.
When they KVM modules are loaded, they try and create a device called /dev/kvm. This fails pretty miserably since /dev/kvm is already a directory due to LVM shenanigans.
Not all is lost though if you’ve done a lot of setup like I had. You can rename VGs. Simply boot from your Ubuntu install CD, choose rescue mode and then jump into a shell. First you deactivate the LVs using
vgchange -a n
then you can rename the VG using
vgrename kvm kvmvg
Not sure whether I should file this problem as a bug. It is a bit of a weird situation.
Doctor it hurts when I put my finger in my eye.
@Robert Collins
I disagree. My choice of a perfectly valid machine name shouldn’t break my system because udev chooses to just litter the /dev/ namespace when perfectly good device names already exist in /dev/mapper.
http://www.faqs.org/rfcs/rfc1178.html đŸ™‚