Written by James McDonald

October 2, 2013

Steps I used to rename a volume group which had the root and swap partitions on it. This was on CentOS 6.4

# display your volume groups
# make note of the name you want 
# to change

# check your options
vgrename --help

# backup your fstab
cp /etc/fstab /etc/fstab-20131002

# open your fstab
vi /etc/fstab

# run a vi find and replace command

# perform the rename
vgrename vg_apfmapx01 vg_system

# change grub.conf
vi /boot/grub/grub.conf

# reboot
shutdown -r now

Problem: On reboot I got kernel panic – not synching (this was due to forgetting to replace the old volume group name in grub.conf with the new volume group name ).

Resolution: Reboot and edit the boot command line to make it correct and then edit grub.conf to make it correct and reboot

# replace the old name "vg_apfmapx01" with 
# the new volume group name "vg_system"
title CentOS (2.6.32-358.18.1.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-358.18.1.el6.x86_64 ro root=/dev/mapper/vg_system-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_LVM_LV=vg_system/lv_swap rd_LVM_LV=vg_system/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        initrd /initramfs-2.6.32-358.18.1.el6.x86_64.img




Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Meraki Open Source Licenses

Until today I assumed that Meraki was built in-house with only closed source software. But having a look at the...


If you have Veeam backup failing with the Updating BCD failed with Cannot update SafeBoot flag and SentinelOne is...