Rename a volume group (LVM / Debian)

Rename a Volume Group on Debian

Small post to explain how to rename a LVM volume group on Debian.

  • Reboot your machine and choose recovery mode (not mandatory but it’s better)
  • Run the command
    # vgrename actualName NewName
    
  • Edit /etc/fstab and change all the entries with the new name
  • Edit /boot/grub/grub.cfg and replace all the old name with the new one
  • Edit /etc/initramfs-tools/conf.d/resume and replace the old name with the new one
  • Rebuild an initramfs:
    # update-initramfs -u -k all
  • Reboot