Article 54GFC Unable to change Volume Group name

Unable to change Volume Group name

by
ddenial
from LinuxQuestions.org on (#54GFC)
Hello All

I want to change the name of the volume group from deb-vg to vgd. The OS is Debian 10 in the KVM Lab environment.

Settings before:
Code:root@deb:~# vgs
VG #PV #LV #SN Attr VSize VFree
deb-vg 1 2 0 wz--n- <9.76g 0

root@deb:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root deb-vg -wi-ao---- <8.76g
swap_1 deb-vg -wi-ao---- 1.00g

root@deb:~# cat /etc/fstab
/dev/mapper/deb--vg-root / ext4 errors=remount-ro 0 1
UUID=3ddccc19-e6ab-40ba-8302-08e25e40227e /boot ext2 defaults 0 2
/dev/mapper/deb--vg-swap_1 none swap sw 0 0

root@deb:~# cat /etc/initramfs-tools/conf.d/resume
RESUME=/dev/mapper/deb--vg-swap_1Following are the steps I did
Code:root@deb:~# vgrename deb-vg vgd
Volume group "deb-vg" successfully renamed to "vgd"

root@deb:~# vgs
VG #PV #LV #SN Attr VSize VFree
vgd 1 2 0 wz--n- <9.76g 0

root@deb:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root vgd -wi-ao---- <8.76g
swap_1 vgd -wi-ao---- 1.00g

root@deb:~# vim /etc/fstab
/dev/mapper/vgd-root / ext4 errors=remount-ro 0 1
UUID=3ddccc19-e6ab-40ba-8302-08e25e40227e /boot ext2 defaults 0 2
/dev/mapper/vgd-swap_1 none swap sw 0 0

root@deb:~# vim /etc/initramfs-tools/conf.d/resume
RESUME=/dev/mapper/vgd-swap_1

root@deb:~# update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-4.19.0-9-amd64

root@deb:~# update-grub2
/usr/sbin/grub-probe: error: failed to get canonical path of `/dev/mapper/deb--vg-root'.I don't know from where the above error is coming. Then, when I reboot, I get stuck (screenshot attached).

What I'm doing wrong? How to properly rename VG?

Thanks
Attached Thumbnailsattachment.php?attachmentid=33360&stc=1& latest?d=yIl2AUoC8zA latest?i=t12u5yEXCXY:JbpUgoqQsog:F7zBnMy latest?i=t12u5yEXCXY:JbpUgoqQsog:V_sGLiP latest?d=qj6IDK7rITs latest?i=t12u5yEXCXY:JbpUgoqQsog:gIN9vFwt12u5yEXCXY
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments