Renaming volume groups on Debian
I’m prepping a lot of stuff with cloud-init lately, and one step I always forget when installing my base OS is keeping the vg name clear of any hostname stuff.
So, as a reminder to myself, and a small howto for whoever else runs into this stuff:
- Rename the VG:
vgrename oldvgname newvgname
- Modify
/etc/fstab
, change all entries that haveoldvgname-<lvname>
tonewvgname-<lvname>
- Edit
/etc/initramfs-tools/conf.d/resume
and change theRESUME=
entry to match the new vgname - Update the initramfs:
update-initramfs -u -k all
- Update the grub install:
update-grub
And reboot.
Comments