RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2077070 - lvmdevices option to remove an entry by device id
Summary: lvmdevices option to remove an entry by device id
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: lvm2
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-20 15:44 UTC by David Teigland
Modified: 2022-11-15 13:16 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.03.16-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 11:20:43 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-119431 0 None None None 2022-04-20 15:47:33 UTC
Red Hat Product Errata RHBA-2022:8358 0 None None None 2022-11-15 11:21:24 UTC

Description David Teigland 2022-04-20 15:44:19 UTC
Description of problem:

For editing system.devices entries with lvmdevices,

previously:

lvmdevices --deldev <name> remove entry by name
lvmdevices --delpvid <pvid> remove entry by PVID

now add:

lvmdevices --deldev <idname> --deviceidtype <idtype> remove entry by device id

When no --deviceidtype is specified, --deldev expects a device name, and when it is specified, --deldev expects a device id.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 6 Corey Marthaler 2022-07-15 19:18:01 UTC
Feature verified in the latest rpms.

kernel-5.14.0-127.el9    BUILT: Sat Jul  9 06:54:36 AM CDT 2022
lvm2-2.03.16-2.el9    BUILT: Thu Jul 14 11:45:18 AM CDT 2022
lvm2-libs-2.03.16-2.el9    BUILT: Thu Jul 14 11:45:18 AM CDT 2022


./devicesfile --devices /dev/sdi1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdb1  -r /usr/tests/sts-rhel8.7 --node hayes-03 -e remove_device_using_deviceid_and_deviceidtype remove_pv_device_using_deviceid_and_deviceidtype attempt_invalid_deviceidtype_removal
Setting allow_mixed_block_sizes to enable
Setting use_devicesfile to enable
        use_devicesfile=1

Copying out blanked system.devices file to begin with
/tmp/system1392.devices -> hayes-03:/etc/lvm/devices/system.devices
============================================================
Iteration 1 of 1 started at Fri Jul 15 14:14:05 2022
============================================================
SCENARIO - attempt_invalid_deviceidtype_removal:  Test the attempted removal of device using INVALID deviceid and deviceidtype (new feature to 9.1 bug 2077070) 
adding entry to the devices file for /dev/sdi1
Attempt the removal of /dev/sdi1 from the devices file using an invalid deviceidtype
lvmdevices --deldev naa.6d09466083d8e100233c181522d9fda8 --deviceidtype devname
  No devices file entry with device id devname naa.6d09466083d8e100233c181522d9fda8.

IDTYPE=sys_wwid IDNAME=naa.6d09466083d8e100233c181522d9fda8 DEVNAME=/dev/sdi1 PVID=. PART=1
removing entry from the devices file for /dev/sdi1


SCENARIO - remove_device_using_deviceid_and_deviceidtype:  Test the removal of device using deviceid and deviceidtype (new feature to 9.1 bug 2077070) 
adding entry to the devices file for /dev/sdi1
Remove device /dev/sdi1 from the devices file using deviceid and deviceidtype
lvmdevices --deldev naa.6d09466083d8e100233c181522d9fda8 --deviceidtype sys_wwid


SCENARIO - remove_pv_device_using_deviceid_and_deviceidtype:  Test the removal of PV device using deviceid and deviceidtype (new feature to 9.1 bug 2077070) 
adding entry to the devices file for /dev/sdi1
creating PV on hayes-03 using device /dev/sdi1
pvcreate --yes -ff   /dev/sdi1
  Physical volume "/dev/sdi1" successfully created.
Remove PV /dev/sdi1 from the devices file using deviceid and deviceidtype
lvmdevices --deldev naa.6d09466083d8e100233c181522d9fda8 --deviceidtype sys_wwid
adding entry to the devices file for /dev/sdi1
removing pv /dev/sdi1 on hayes-03
  Labels on physical volume "/dev/sdi1" successfully wiped.
removing entry from the devices file for /dev/sdi1

Comment 10 Corey Marthaler 2022-07-27 21:14:36 UTC
Fix verified in the latest kernel/lvm2 rpms:

kernel-5.14.0-131.el9    BUILT: Mon Jul 18 02:51:09 PM CDT 2022
lvm2-2.03.16-2.el9    BUILT: Thu Jul 14 11:45:18 AM CDT 2022
lvm2-libs-2.03.16-2.el9    BUILT: Thu Jul 14 11:45:18 AM CDT 2022



SCENARIO - attempt_invalid_deviceidtype_removal:  Test the attempted removal of device using INVALID deviceid and deviceidtype (new feature to 9.1 bug 2077070) 
adding entry to the devices file for /dev/sdm1
Attempt the removal of /dev/sdm1 from the devices file using an invalid deviceidtype
lvmdevices --deldev naa.6d09466083d8e100233c182f2463cc77 --deviceidtype mpath_uuid
  No devices file entry with device id mpath_uuid naa.6d09466083d8e100233c182f2463cc77.
IDTYPE=sys_wwid IDNAME=naa.6d09466083d8e100233c182f2463cc77 DEVNAME=/dev/sdm1 PVID=1XiKMqvbGou52atUimuYRDVjX8JN5G9c PART=1
removing entry from the devices file for /dev/sdm1


SCENARIO - remove_device_using_deviceid_and_deviceidtype:  Test the removal of device using deviceid and deviceidtype (new feature to 9.1 bug 2077070) 
adding entry to the devices file for /dev/sdm1
Remove device /dev/sdm1 from the devices file using deviceid and deviceidtype
lvmdevices --deldev naa.6d09466083d8e100233c182f2463cc77 --deviceidtype sys_wwid


SCENARIO - remove_pv_device_using_deviceid_and_deviceidtype:  Test the removal of PV device using deviceid and deviceidtype (new feature to 9.1 bug 2077070) 
adding entry to the devices file for /dev/sdm1
creating PV on hayes-03 using device /dev/sdm1
pvcreate --yes -ff   /dev/sdm1
  Physical volume "/dev/sdm1" successfully created.
Remove PV /dev/sdm1 from the devices file using deviceid and deviceidtype
lvmdevices --deldev naa.6d09466083d8e100233c182f2463cc77 --deviceidtype sys_wwid
adding entry to the devices file for /dev/sdm1
removing pv /dev/sdm1 on hayes-03
  Labels on physical volume "/dev/sdm1" successfully wiped.
removing entry from the devices file for /dev/sdm1

Comment 12 errata-xmlrpc 2022-11-15 11:20:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (lvm2 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8358


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