How do you mount a LVM patition that has the same VG name as my current partition
I had a similar issue on my system. I just renamed the external logical volume group.
Beware that this probably makes the renamed drive unbootable! I don't know which files you have to change so you can boot again afterwards.
First get UUID of group to rename. I used
$ sudo vgdisplay
--- Volume group ---
VG Name mint-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 119,00 GiB
PE Size 4,00 MiB
Total PE 30464
Alloc PE / Size 30464 / 119,00 GiB
Free PE / Size 0 / 0
VG UUID jWIQCX-uxUT-aG1x-1tpc-1Ixk-pxw2-gL6mlJ
--- Volume group ---
VG Name mint-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 238,23 GiB
PE Size 4,00 MiB
Total PE 60987
Alloc PE / Size 60987 / 238,23 GiB
Free PE / Size 0 / 0
VG UUID TZus4Q-JQKU-eyyl-kkEv-liM4-mUXd-e19TcT
I want to rename the first one. Because this is my thumb drive.
Now I know the UUID and can execute a rename. Maybe a mount could also work with the UUID but I didn't care about it.
$ sudo vgrename -v jWIQCX-uxUT-aG1x-1tpc-1Ixk-pxw2-gL6mlJ mint-stick
Checking for existing volume group "jWIQCX-uxUT-aG1x-1tpc-1Ixk-pxw2-gL6mlJ"
Checking for new volume group "mint-stick"
Archiving volume group "mint-vg" metadata (seqno 3).
Writing out updated volume group
Renaming "/dev/mint-vg" to "/dev/mint-stick"
Creating volume group backup "/etc/lvm/backup/mint-stick" (seqno 4).
Volume group "mint-vg" successfully renamed to "mint-stick"
Wiping cache of LVM-capable devices
Wiping internal VG cache
To mount an external hard-disk (LVM2 and EXT4 partitions):
-
Check the UID number of the hard-disk
sudo vgdisplay
-
Mount your hard-disk:
sudo vgrename <UID> volgroup
-
Activate the mount volume:
sudo vgchange -a y