· sysadmin

Renaming Volume Groups in Linux

What is that you say? Cloned a Linux machine and decided to rename that misnamed volume group using vgrename /dev/vg_RAWRStupidName /dev/vg_NiceName? Oh and now your rebooted without first changing your /etc/fstab and /etc/grub.conf and get a good old fashioned Kernel Panic? Well lucky you I remembered to write this down:

  1. When booting go into the Edit mode for Grub (Generally ESC during boot).
  2. Change the kernel boot parameters to reference your new VG name.
  3. Press Enter and then B to boot.
  4. Once you boot, remount the filesystem RW so you can edit it (At this point you’ve likely failed a FSCK and landed in rescue mode. If not, do 5 then skip to number 8.
  5. Remounting is done with mount -o remount,rw /
  6. Edit your /etc/fstab with the new VG name.
  7. Reboot
  8. Repeat step 1-3
  9. Edit /etc/grub.conf with your new VG name
  10. Breathe deep.
  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket