Description of problem: Allowing the vg* commands to take a UUID as input would be very useful, especially virtualized setups. This is a bz to track all relevant commands. Currently AFAIK only vgrename allows a UUID. To start, I will focus on vgremove but probably common code will be modified.
*** Bug 1021715 has been marked as a duplicate of this bug. ***
From bug 1021715: "it would suffice to add this ability to lvs, vgchange, and vgremove."
In case it will help motivate you to fix this, see bug 1015474 for one example of a bug reported against anaconda related to this bug. There have been many dozens of such bugs over the years. Please fix this.
We have -S|--select now - it should be possible to specify UUIDS instead of names using: lvs/vgchange/vgremove --select 'uuid=...' I need to check if it works fine with lvmetad though...
I think we can close this one as requested functionality is available by using the -S|--select now with the vg_uuid or lv_uuid specified as selection criterion. Support for using selection for reporting commands is available since lvm2 v2.02.107 and for other processing commands (like vgchange/lvchange/vgremove etc) is available since lvm2 v2.02.117: # lvs -o lv_name,lv_uuid,vg_name,vg_uuid LV LV UUID VG VG UUID lvol0 z2MIfV-bPnj-2NIH-lGB7-GUZe-QS4Q-ObYSns vg PsDJb1-gm4x-X7cb-EqFr-yS96-fvk5-S1dThY lvol0 eo7X7y-II02-JxVI-T5Gu-GBxG-aWfb-QMxCN9 vg fwkbjs-sObi-2ohp-yw0o-e2dN-hMGr-PA21yk lvol1 ssVnza-5CKg-V2BX-kViR-oPD1-akTU-kbg28q vg PsDJb1-gm4x-X7cb-EqFr-yS96-fvk5-S1dThY # lvs -o lv_name,lv_uuid,vg_name,vg_uuid -S 'lv_uuid=z2MIfV-bPnj-2NIH-lGB7-GUZe-QS4Q-ObYSns' LV LV UUID VG VG UUID lvol0 z2MIfV-bPnj-2NIH-lGB7-GUZe-QS4Q-ObYSns vg PsDJb1-gm4x-X7cb-EqFr-yS96-fvk5-S1dThY lvs -o lv_name,lv_uuid,vg_name,vg_uuid -S 'lv_uuid=eo7X7y-II02-JxVI-T5Gu-GBxG-aWfb-QMxCN9' LV LV UUID VG VG UUID lvol0 eo7X7y-II02-JxVI-T5Gu-GBxG-aWfb-QMxCN9 vg fwkbjs-sObi-2ohp-yw0o-e2dN-hMGr-PA21yk # vgchange -ay -S 'vg_uuid=PsDJb1-gm4x-X7cb-EqFr-yS96-fvk5-S1dThY' Volume group "vg" successfully changed 2 logical volume(s) in volume group "vg" now active # lvs -o lv_active,lv_name,lv_uuid,vg_name,vg_uuid Active LV LV UUID VG VG UUID active lvol0 z2MIfV-bPnj-2NIH-lGB7-GUZe-QS4Q-ObYSns vg PsDJb1-gm4x-X7cb-EqFr-yS96-fvk5-S1dThY lvol0 eo7X7y-II02-JxVI-T5Gu-GBxG-aWfb-QMxCN9 vg fwkbjs-sObi-2ohp-yw0o-e2dN-hMGr-PA21yk active lvol1 ssVnza-5CKg-V2BX-kViR-oPD1-akTU-kbg28q vg PsDJb1-gm4x-X7cb-EqFr-yS96-fvk5-S1dThY # lvchange -an -S 'lv_uuid=z2MIfV-bPnj-2NIH-lGB7-GUZe-QS4Q-ObYSns' # lvs -o lv_active,lv_name,lv_uuid,vg_name,vg_uuid Active LV LV UUID VG VG UUID lvol0 z2MIfV-bPnj-2NIH-lGB7-GUZe-QS4Q-ObYSns vg PsDJb1-gm4x-X7cb-EqFr-yS96-fvk5-S1dThY lvol0 eo7X7y-II02-JxVI-T5Gu-GBxG-aWfb-QMxCN9 vg fwkbjs-sObi-2ohp-yw0o-e2dN-hMGr-PA21yk active lvol1 ssVnza-5CKg-V2BX-kViR-oPD1-akTU-kbg28q vg PsDJb1-gm4x-X7cb-EqFr-yS96-fvk5-S1dThY