Bug 449832 - all relevant lvm2 vg* commands should allow UUID as input
Summary: all relevant lvm2 vg* commands should allow UUID as input
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: rawhide
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: LVM and device-mapper development team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1021715 (view as bug list)
Depends On:
Blocks: BrassowRHEL7Bugs
TreeView+ depends on / blocked
 
Reported: 2008-06-03 20:27 UTC by Dave Wysochanski
Modified: 2015-10-05 10:58 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-05 10:58:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1158475 0 unspecified CLOSED LVMError: lvremove failed for home: running lvm lvremove --config devices { preferred_names=["^/dev/mapper/", "^/dev/md... 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1158533 0 unspecified CLOSED selecting one disk from VG spanning over multiple disks causes troubles 2023-09-14 02:49:58 UTC
Red Hat Bugzilla 1198367 1 low CLOSED LVMError: lvremove failed 2024-06-01 07:26:51 UTC

Internal Links: 1158475 1158533 1198367

Description Dave Wysochanski 2008-06-03 20:27:17 UTC
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 07:03:47 UTC
*** Bug 1021715 has been marked as a duplicate of this bug. ***

Comment 2 Alasdair Kergon 2013-10-22 12:30:31 UTC
From bug 1021715: "it would suffice to add this ability to lvs, vgchange, and vgremove."

Comment 3 David Lehman 2013-10-22 16:41:47 UTC
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 14:01:26 UTC
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 10:58:16 UTC
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.