{"id":5571,"date":"2016-01-13T09:45:21","date_gmt":"2016-01-13T01:45:21","guid":{"rendered":"http:\/\/rmohan.com\/?p=5571"},"modified":"2016-01-13T09:45:21","modified_gmt":"2016-01-13T01:45:21","slug":"rename-root-volume-group-vg-on-linux-server","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5571","title":{"rendered":"Rename Root Volume Group (VG) on Linux Server"},"content":{"rendered":"<p>This walk-through worked on a virtual server running RHEL 6.7 in a VMware environment.<\/p>\n<p>As I rebuilt an existing VMware guest that was being scheduled to go into production, I realized I did not rename the default volume group from vg_hostname to rootvg.<\/p>\n<p>You must be root user and it is extremely important to backup the files below. It\u2019s also important to know how to boot up in rescue mode with other boot media in the event there was a typo or other unforeseen issue.<\/p>\n<p>Backup fstab file<\/p>\n<pre>cp \/etc\/fstab \/etc\/fstab.orig<\/pre>\n<p>Backup grub.conf file<\/p>\n<pre>cp \/boot\/grub\/grub.conf \/boot\/grub\/grub.conf.orig<\/pre>\n<p>Rename volume group<\/p>\n<pre>vgrename \/dev\/vg_OLDname \/dev\/rootvg<\/pre>\n<p>Change all instances of the old volume group in the following files:<br \/>\nEdit \/etc\/grub.conf (which is a symbolic link to \/boot\/grub\/grub.conf)<\/p>\n<pre>vim \/etc\/grub.conf<\/pre>\n<p>Search and replace<\/p>\n<pre>:%s\/vg_OLDname\/rootvg\/g<\/pre>\n<p>Edit fstab file<\/p>\n<pre>vim \/etc\/fstab<\/pre>\n<p>Search and replace<\/p>\n<pre>:%s\/vg_OLDname\/rootvg\/g<\/pre>\n<p>Move boot image<\/p>\n<pre>mv \/boot\/initramfs-$(uname -r).img \/boot\/initramfs-$(uname -r).img.backup<\/pre>\n<pre>dracut -v \/boot\/initramfs-$(uname -r).img $(uname -r)<\/pre>\n<p>Verify your work<br \/>\nReboot<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This walk-through worked on a virtual server running RHEL 6.7 in a VMware environment.<\/p>\n<p>As I rebuilt an existing VMware guest that was being scheduled to go into production, I realized I did not rename the default volume group from vg_hostname to rootvg.<\/p>\n<p>You must be root user and it is extremely important to backup [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5571"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5571"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5571\/revisions"}],"predecessor-version":[{"id":5572,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5571\/revisions\/5572"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}