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 2027913 - 'pvcreate --test' should not be modifying the devices/system.devices file
Summary: 'pvcreate --test' should not be modifying the devices/system.devices file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: lvm2
Version: 9.0
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 2027906
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-01 03:24 UTC by Corey Marthaler
Modified: 2022-05-17 16:25 UTC (History)
10 users (show)

Fixed In Version: lvm2-2.03.15-0.1.20211115git4a1f617.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2027906
Environment:
Last Closed: 2022-05-17 15:56:27 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-104394 0 None None None 2021-12-01 04:50:48 UTC
Red Hat Product Errata RHBA-2022:3972 0 None None None 2022-05-17 15:56:40 UTC

Description Corey Marthaler 2021-12-01 03:24:28 UTC
This exists in rhel9.0 as well.

kernel-5.14.0-10.el9    BUILT: Tue Oct 26 07:00:13 PM CDT 2021
lvm2-2.03.14-1.el9    BUILT: Wed Oct 20 11:22:27 AM CDT 2021
lvm2-libs-2.03.14-1.el9    BUILT: Wed Oct 20 11:22:27 AM CDT 2021



+++ This bug was initially created as a clone of Bug #2027906 +++

Description of problem:
# Normal device PV (/dev/sdb1)

[root@hayes-02 ~]# cat /etc/lvm/devices/system.devices
# LVM uses devices listed in this file.
# Created by LVM command pvremove pid 1644466 at Tue Nov 30 20:45:23 2021
VERSION=1.1.4736

[root@hayes-02 ~]# pvcreate /dev/sdb1
  Physical volume "/dev/sdb1" successfully created.

[root@hayes-02 ~]# cat /etc/lvm/devices/system.devices
# LVM uses devices listed in this file.
# Created by LVM command pvcreate pid 1644509 at Tue Nov 30 20:45:49 2021
VERSION=1.1.4737
IDTYPE=sys_wwid IDNAME=naa.6d094660650d1e0022bd29e81db0cefc DEVNAME=/dev/sdb1 PVID=4Wj0WrIIBKh8h3zQMn8cQHuxx2HFBFkT PART=1

[root@hayes-02 ~]# pvcreate --test /dev/sdb1
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  Physical volume "/dev/sdb1" successfully created.
[root@hayes-02 ~]# cat /etc/lvm/devices/system.devices
# LVM uses devices listed in this file.
# Created by LVM command fullreport pid 1644515 at Tue Nov 30 20:45:59 2021
VERSION=1.1.4739
IDTYPE=sys_wwid IDNAME=naa.6d094660650d1e0022bd29e81db0cefc DEVNAME=/dev/sdb1 PVID=4Wj0WrIIBKh8h3zQMn8cQHuxx2HFBFkT PART=1



# LV device PV (/dev/VG/LV)

[root@hayes-02 ~]# vgcreate VG /dev/sdb1
  Volume group "VG" successfully created
[root@hayes-02 ~]# lvcreate -n LV -L 10G VG
  Logical volume "LV" created.
[root@hayes-02 ~]# pvcreate --config devices/scan_lvs=1 /dev/VG/LV 
  Physical volume "/dev/VG/LV" successfully created.

[root@hayes-02 ~]# cat /etc/lvm/devices/system.devices
# LVM uses devices listed in this file.
# Created by LVM command pvcreate pid 1644564 at Tue Nov 30 20:48:49 2021
VERSION=1.1.4743
IDTYPE=sys_wwid IDNAME=naa.6d094660650d1e0022bd29e81db0cefc DEVNAME=/dev/sdb1 PVID=4Wj0WrIIBKh8h3zQMn8cQHuxx2HFBFkT PART=1
IDTYPE=lvmlv_uuid IDNAME=LVM-dDU10KcCqvdXk1ojfPActULMZU3m3ED2QbQO41RHwBSfh66Y0BB5O0TiPZR43D1C DEVNAME=/dev/VG/LV PVID=Q4DRDDYcMe0d2Ico5wqC9nF99RFJFp7C

[root@hayes-02 ~]# pvcreate --test --config devices/scan_lvs=1 /dev/VG/LV 
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  Physical volume "/dev/VG/LV" successfully created.

# PVID was altered
[root@hayes-02 ~]# cat /etc/lvm/devices/system.devices
# LVM uses devices listed in this file.
# Created by LVM command pvcreate pid 1644569 at Tue Nov 30 20:49:10 2021
VERSION=1.1.4744
IDTYPE=sys_wwid IDNAME=naa.6d094660650d1e0022bd29e81db0cefc DEVNAME=/dev/sdb1 PVID=4Wj0WrIIBKh8h3zQMn8cQHuxx2HFBFkT PART=1
IDTYPE=lvmlv_uuid IDNAME=LVM-dDU10KcCqvdXk1ojfPActULMZU3m3ED2QbQO41RHwBSfh66Y0BB5O0TiPZR43D1C DEVNAME=/dev/VG/LV PVID=cOWcuNNc9Ti5HUjCwSb14HUXhHHP4zm2


Version-Release number of selected component (if applicable):
kernel-4.18.0-348.4.el8.kpq0    BUILT: Wed Oct 27 15:00:32 CDT 2021
lvm2-2.03.14-1.el8    BUILT: Wed Oct 20 10:18:17 CDT 2021
lvm2-libs-2.03.14-1.el8    BUILT: Wed Oct 20 10:18:17 CDT 2021


How reproducible:
Everytime

Comment 1 Corey Marthaler 2022-02-17 18:06:04 UTC
Both scenarios pass now in the latest LVM rpms. Marking Verified:Tested.

kernel-5.14.0-58.el9    BUILT: Thu Feb 10 11:18:21 AM CST 2022
lvm2-2.03.14-4.el9    BUILT: Wed Feb 16 06:01:21 AM CST 2022
lvm2-libs-2.03.14-4.el9    BUILT: Wed Feb 16 06:01:21 AM CST 2022
lvm2-dbusd-2.03.14-4.el9    BUILT: Wed Feb 16 07:23:08 AM CST 2022



SCENARIO - pvcreate_test_on_linear_alteration_check:  Test for the alteration of the devicesfiles when pvcreate --test is used on linear device (bug 2027906 2027913) 
adding entry to the devices file for /dev/sdc1
creating PV on hayes-02 using device /dev/sdc1
pvcreate --yes -ff  /dev/sdc1
  Physical volume "/dev/sdc1" successfully created.
creating VG on hayes-02 using PV(s) /dev/sdc1
vgcreate   df /dev/sdc1
  Volume group "df" successfully created
lvcreate --yes --type linear -n dflv -L 500M df  
  Logical volume "dflv" created.
adding entry to the devices file for /dev/df/dflv
creating PV on hayes-02 using device /dev/df/dflv
pvcreate --yes -ff --config devices/scan_lvs=1 /dev/df/dflv
  Physical volume "/dev/df/dflv" successfully created.
pvcreate --test --config devices/scan_lvs=1 /dev/df/dflv
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  Physical volume "/dev/df/dflv" successfully created.
LVM pre:1tYnl5HZatxNN0PsnaHb2CYqRkH1KbPO post:1tYnl5HZatxNN0PsnaHb2CYqRkH1KbPO
FILE pre:1tYnl5HZatxNN0PsnaHb2CYqRkH1KbPO post:1tYnl5HZatxNN0PsnaHb2CYqRkH1KbPO
removing pv /dev/df/dflv on hayes-02
  Labels on physical volume "/dev/df/dflv" successfully wiped.
removing entry from the devices file for /dev/df/dflv
lvremove  -f df/dflv
  Logical volume "dflv" successfully removed.
removing vg df from hayes-02
  Volume group "df" successfully removed
removing pv /dev/sdc1 on hayes-02
  Labels on physical volume "/dev/sdc1" successfully wiped.
removing entry from the devices file for /dev/sdc1


SCENARIO - pvcreate_test_alteration_check:  Test for the alteration of the devicesfiles when pvcreate --test is used on device (bug 2027906 2027913) 
adding entry to the devices file for /dev/sdc1
creating PV on hayes-02 using device /dev/sdc1
pvcreate --yes -ff  /dev/sdc1
  Physical volume "/dev/sdc1" successfully created.
pvcreate --test /dev/sdc1
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  Physical volume "/dev/sdc1" successfully created.
LVM pre:OXm3ekIc0dK7eOw7myvGviEOBVICGdnx post:OXm3ekIc0dK7eOw7myvGviEOBVICGdnx
FILE pre:OXm3ekIc0dK7eOw7myvGviEOBVICGdnx post:OXm3ekIc0dK7eOw7myvGviEOBVICGdnx
removing pv /dev/sdc1 on hayes-02
  Labels on physical volume "/dev/sdc1" successfully wiped.
removing entry from the devices file for /dev/sdc1

Comment 4 Corey Marthaler 2022-02-21 21:24:09 UTC
Marking VERIFIED based on comment #1 run on the latest build.

Comment 6 errata-xmlrpc 2022-05-17 15:56:27 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 (new packages: lvm2), 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:3972


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