To mount LVM Volume Group with similar name on same system

From Notes_Wiki
Revision as of 08:23, 22 January 2019 by Saurabh (talk | contribs)

<yambe:breadcrumb self="mount LVM Volume Group with similar name on same system">Lvm|Lvm</yambe:breadcrumb>

To mount Volume Group with similar name on same system

If we have to mount two volume groups with same name (say VolGroup00) on same system then we will face problems. To solve this problem use

  • Find out UUID of Volume Group using
    lvm vgdisplay
  • Then rename the volume group to something new using
    lvm vgrename NP3zDl-Bm2v-HAEq-xpba-1Yaa-p1us-TZmUWg www_volgroup00
  • Now you can activate the VolGroup using
    lvm vgchange -a y www_volgroup00
  • And now mount the Logical Volumes using
    mount /dev/www_volgroup00/LogVol00 server_root/home

This is particularly important if we have mounted virtual hosts hard-disk using kpartx -va <raw_image_file> and now we want to use guest hosts Volume Group, and unfortunately it has same name as base OS.

Read LVM - tips on problem associated with using above technique on original / production systems.