LVM - tips

From Notes_Wiki

Home > CentOS > CentOS 6.x > Filesystem or partition tools > Lvm > LVM - tips

Installing OS from scratch

When we install OS from scratch and plan to use LVM then we should be careful about these things:

  • The root or / partition should not be in LVM. If root or / partition is in LVM we cant make any changes to volumes from system itself we have to boot from LiveCD etc.
    Also changes like renaming of VolGroup also have to be performed from liveCD (or from base OS in case of virtual machine) and the system stops booting. I tried renaming VolGroup00 to some other name and virtual machine stopped booting. Even after making corresponding change in '/etc/fstab', '/etc/mtab', '/etc/lvm/*', '/etc/blkid/blkid.tab', '/boot/grub/grub.conf' etc. the machine was not booting with new VolumeGroup name.
    I had searched entire '/etc' and entire '/boot' for older name VolGroup00 using 'grep -r' but could not find any configuration file which referred to old name, still the machine was not booting.
  • The name of volume group should not be 'VolGroup00' or we should keep unique Volume Group name for each server. This is especially required for virtual servers both base and guest OS. This helps us in mounting guest files in base OS if guest is not working. If we keep same names then we wont be able to mount guest LVM partitions in base OS for recovery.
    We can use vgrename with UUID to rename Volume Group of base and then mount it. But then guest wont boot with new changed name. Also we cant use vgrename to again change name to VolGroup00 as now we would receive error that name is already used. Hence we wont be able to restore name for base machines Volume Group.
    To avoid all this it is best to use unique and identifiable names for Volume Groups of all servers.


Home > CentOS > CentOS 6.x > Filesystem or partition tools > Lvm > LVM - tips