You are here
Renaming the Volume Group Containing /
Almost every server I work with is a virtual machine; accordingly I like to do one small install with all the packages that I always want [like pam-nss-ldapd, snmp-utils, dstat, etc...] but don't install by default. Then I make sure VMware tools is installed and operational. From that point forward I can just clone that one VM and add to it when I want a new instance of something.
The only downside to this is that all the machines end up with the same volume group name: typically __VolGroup0)) or some such thing. That's ugly and limits the ability to move volume groups around - these are virtual disks after all. Renaming a volume group is straight forward:
vgrename /dev/VolGroup0 /dev/Carazon
Text 1: Rename the volume group VolGroup0 to be named Carazon.
Hold it! Now the machine won't boot anymore! You get the pleasure of rebooting into "Kernel Panic: blah blah blah". If you rename the volume group containing the root file-system and swap space you also have to update that name in two places -
- In /etc/fstab. This one is obvious and I usually remember.
- In /etc/grub.conf. Otherwise the kernel tries to mount the root file-system using the old volume group name.
Done this so many times... always forget.