{"id":20,"date":"2012-11-06T01:14:58","date_gmt":"2012-11-06T09:14:58","guid":{"rendered":"http:\/\/blog.ls-al.com\/?p=20"},"modified":"2012-11-06T01:18:36","modified_gmt":"2012-11-06T09:18:36","slug":"how-to-rename-your-logical-volume-group","status":"publish","type":"post","link":"https:\/\/blog.ls-al.com\/how-to-rename-your-logical-volume-group\/","title":{"rendered":"How to Rename your Logical Volume Group"},"content":{"rendered":"

Boot a Linux live CD. I used Fedora which I know has LVM enabled in the kernel at boot time.<\/p>\n

# vgchange -a y\r\n  5 logical volume(s) in volume group \"locallvm\" now active\r\n\r\n# mkdir \/mnt\/a\r\n\r\n# mount \/dev\/locallvm\/root \/mnt\/a<\/pre>\n

** Figure out where your \/boot physical partition lives. This one was sda2 but it could easily be \/dev\/sda1 also.<\/p>\n

# mount \/dev\/sda2 \/mnt\/a\/boot\r\n\r\n# ls \/mnt\/a\/boot\/\r\nabi-3.0.0-12-server         memtest86+.bin\r\nconfig-3.0.0-12-server      memtest86+_multiboot.bin\r\ngrub                        System.map-3.0.0-12-server\r\ninitrd.img-3.0.0-12-server  vmcoreinfo-3.0.0-12-server\r\nlost+found                  vmlinuz-3.0.0-12-server\r\n\r\n# mount -o bind \/sys \/mnt\/a\/sys\r\n** Note:  if \u2013o dev and \u2013o proc don\u2019t work, use \u2013o bind for the next two\r\n# mount -o dev \/dev \/mnt\/a\/dev\r\n# mount -o proc \/proc \/mnt\/a\/proc\r\n\r\n# chroot \/mnt\/a \/bin\/bash<\/pre>\n

Run update-grub
\n** If \/run\/lock does not exist, create the directory or else update-grub will fail since \/var\/lock is linked to \/run\/lock.<\/p>\n

Use ls \/boot to find the most current kernel and then run mkinitramfs on it.<\/p>\n

mkinitramfs -k -o \/boot\/initrd.img-3.2.0-29-generic -v 3.2.0-29-generic<\/pre>\n

This next step is important and you need to do it before you reboot. If necessary change \/etc\/fstab references to point to new VG name. <\/strong><\/p>\n

Type exit. Choose reboot system from menu. Eject the CD so we don\u2019t boot off CD by default.<\/p>\n","protected":false},"excerpt":{"rendered":"

Boot a Linux live CD. I used Fedora which I know has LVM enabled in the kernel at boot time.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-20","post","type-post","status-publish","format-standard","hentry","category-lvm"],"_links":{"self":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/comments?post=20"}],"version-history":[{"count":0,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/20\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/media?parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/categories?post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/tags?post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}