How to: Rename Volume Group when there are multiple Volume Group with the same name

If for some reason, you end up screwing your LVM configuration with two volume group of the same name, you might see some error like the following:
Multiple VGs found with the same name: skipping ** Use the VG UUID with --select vg_uuid=<uuid>

This would give the same result if you are trying to rename a LV that has a name that belongs to two Volume Groups. At these cases, you only have the option to use UUID. blkid command doesn't give the UUID of the volumegroup. To find the volumegroup UUID, you would need to use vgdisplay. Once you have the UUID for the desired VG, it turns out that you can use the vgrename directly only UUID like the following:
vgrename hL1QTc-gS2a-2xHR-XU1F-Of9Q-sgUQ-ckMxkF vg1

This would rename volume group with UUID 'hL1QTc-gS2a-2xHR-XU1F-Of9Q-sgUQ-ckMxkF' to vg1 regardless of it's previous name.
  • volume group, lvm, vgrename
  • 3 Users Found This Useful
Was this answer helpful?

Related Articles

LVM Cheatsheet

To install LVM2 in CentOS/Redhat servers: yum install lvm2 1. Add a partition to physical...

How to: Extend LVM partition

To increase the partition lv0 under volume group vg0 by 50GB, use lvextend command: lvextend...

How to: LVM Snapshot

LVM snapshot can be useful for filesystem integrity check and backups. A snapshot of size 15GB...

How to: Device Mapper Number to LV Name

It is often confusing when device mapper number appears while troubleshooting in place of logical...

How to: Repair a lvm thin pool

Sometimes there can be error like the following:Thin's thin-pool needs inspection.It can appear...