Comment 4 for bug 1905412

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

FYI I just looked at this system after installing with only one disk enabled.

I found this which might be interesting for LVM handling:

#1 two LVMs with same name co-exist
$ sudo vgs -o vg_name,vg_uuid
  VG VG UUID
  ubuntu-vg 6j9dUF-KO8t-7Svv-RRze-VcMu-pMUY-FJxgA8
  ubuntu-vg bKYrCn-gMDT-UFAW-XUlX-oRVS-hUxr-ksINed

Usual commands would fail:
$ sudo vgremove ubuntu-vg
  Multiple VGs found with the same name: skipping ubuntu-vg
  Use --select vg_uuid=<uuid> in place of the VG name.

We can look at the UUIDs and maybe even know which one created.

$ sudo vgdisplay
  --- Volume group ---
  VG Name ubuntu-vg
  System ID
  Format lvm2
  Metadata Areas 2
  Metadata Sequence No 6
  VG Access read/write
  VG Status resizable
  MAX LV 0
  Cur LV 1
  Open LV 0
  Max PV 0
  Cur PV 4
  Act PV 2
  VG Size <169.12 GiB
  PE Size 4.00 MiB
  Total PE 43294
  Alloc PE / Size 43294 / <169.12 GiB
  Free PE / Size 0 / 0
  VG UUID 6j9dUF-KO8t-7Svv-RRze-VcMu-pMUY-FJxgA8

  --- Volume group ---
  VG Name ubuntu-vg
  System ID
  Format lvm2
  Metadata Areas 1
  Metadata Sequence No 2
  VG Access read/write
  VG Status resizable
  MAX LV 0
  Cur LV 1
  Open LV 1
  Max PV 0
  Cur PV 1
  Act PV 1
  VG Size <19.63 GiB
  PE Size 4.00 MiB
  Total PE 5025
  Alloc PE / Size 5025 / <19.63 GiB
  Free PE / Size 0 / 0
  VG UUID bKYrCn-gMDT-UFAW-XUlX-oRVS-hUxr-ksINed

In my case for example I can actually remove one of them via:

$ sudo vgremove --select vg_uuid=bKYrCn-gMDT-UFAW-XUlX-oRVS-hUxr-ksINed
Do you really want to remove volume group "ubuntu-vg" containing 1 logical volumes? [y/n]: y
  Logical volume ubuntu-vg/ubuntu-lv contains a filesystem in use.

Maybe this helps implementing some details in regard to "potentially the same VG Name"