Bug 449832 - all relevant lvm2 vg* commands should allow UUID as input
all relevant lvm2 vg* commands should allow UUID as input
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: lvm2 (Show other bugs)
rawhide
All Linux
high Severity medium
: ---
: ---
Assigned To: LVM and device-mapper development team
Fedora Extras Quality Assurance
: FutureFeature
: 1021715 (view as bug list)
Depends On:
Blocks: BrassowRHEL7Bugs
  Show dependency treegraph
 
Reported: 2008-06-03 16:27 EDT by Dave Wysochanski
Modified: 2015-10-05 06:58 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-05 06:58:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dave Wysochanski 2008-06-03 16:27:17 EDT
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.
Comment 1 Zdenek Kabelac 2013-10-22 03:03:47 EDT
*** Bug 1021715 has been marked as a duplicate of this bug. ***
Comment 2 Alasdair Kergon 2013-10-22 08:30:31 EDT
From bug 1021715: "it would suffice to add this ability to lvs, vgchange, and vgremove."
Comment 3 David Lehman 2013-10-22 12:41:47 EDT
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.
Comment 4 Peter Rajnoha 2015-09-24 10:01:26 EDT
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...
Comment 5 Peter Rajnoha 2015-10-05 06:58:16 EDT
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

Note You need to log in before you can comment on or make changes to this bug.