Using MaaS to reinstall Ubuntu 18.04, I ended up in the situation where I've got two Volume Group's named "vgroot", two logical volumes named lvroot and an extra PV now named [unknown].
How do I get rid of the extra stuff? I can't pvremove by uuid, LVM unknown device: how to recover? says you're supposed to use vgreduce --removemissing to remove those.
$ sudo vgreduce --removemissing --verbose vgroot
Multiple VGs found with the same name: skipping vgroot
Use --select vg_uuid=<uuid> in place of the VG name.
vgreduce doesn't have a --select
option.
How to rename a logical volume when there are multiple volume groups with the same name has an answer for that, but now:
$ sudo vgrename 4vrdpY-MCJM-HBfT-RVhe-WnTr-2NGr-NDOJ6H old --force
Processing VG vgroot because of matching UUID 4vrdpY-MCJM-HBfT-RVhe-WnTr-2NGr-NDOJ6H
WARNING: Device for PV hKK5e2-wVbK-H6GR-0kly-Z5f6-UDUP-jImvr4 not found or rejected by a filter.
Cannot change VG vgroot while PVs are missing.
Consider vgreduce --removemissing.
Cannot process volume group vgroot
and now we're back to what I tried first.