Bug 2040482
| Summary: | lvmdevices --check|update do not seem to work currently | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Corey Marthaler <cmarthal> |
| Component: | lvm2 | Assignee: | David Teigland <teigland> |
| lvm2 sub component: | Devices, Filtering and Stacking | QA Contact: | cluster-qe <cluster-qe> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | medium | ||
| Priority: | high | CC: | agk, cluster-qe, heinzm, jbrassow, mcsontos, mgandhi, msnitzer, prajnoha, teigland, zkabelac |
| Version: | 9.0 | Keywords: | Triaged |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.03.15-0.1.20211115git4a1f617.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 2039977 | Environment: | |
| Last Closed: | 2022-05-17 15:56:34 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 2039977 | ||
| Bug Blocks: | |||
|
Description
Corey Marthaler
2022-01-13 19:54:23 UTC
in main branch: https://sourceware.org/git/?p=lvm2.git;a=commit;h=a972d63c547dc9699c0b3664175eb96b5d89ff8f This improves the lvmdevices check output to have an error exit if the devices file needs an update. in main branch: https://sourceware.org/git/?p=lvm2.git;a=commit;h=8f50c5e79b6ce619a53d51353dded2f84953af00 improves adding/removing devices when the file has bad entries. in main branch: https://sourceware.org/git/?p=lvm2.git;a=commit;h=3fce6a81f82f2b2b1f75e5d49dbffc77bd637b3c fixes lvmdevices --deldev to work when the device is missing. (In reply to David Teigland from comment #2) > in main branch: > https://sourceware.org/git/?p=lvm2.git;a=commit; > h=8f50c5e79b6ce619a53d51353dded2f84953af00 > > improves adding/removing devices when the file has bad entries. That commit is actually associated with related lvmdevices bug 2040491. (In reply to David Teigland from comment #3) > (In reply to David Teigland from comment #2) > > in main branch: > > https://sourceware.org/git/?p=lvm2.git;a=commit; > > h=8f50c5e79b6ce619a53d51353dded2f84953af00 > > > > improves adding/removing devices when the file has bad entries. > > That commit is actually associated with related lvmdevices bug 2040491. wrong, that's a rhel8 bz. the commit is actually associated with related lvmdevices bug 2040937 (rhel9 bz) This appears fixed in the latest build. This can be marked Modified and the Fixed In Version updated. kernel-5.14.0-55.el9 BUILT: Fri Feb 4 05:27:31 PM CST 2022 lvm2-2.03.15-0.1.20211115git4a1f617.el9 BUILT: Tue Feb 8 02:56:52 PM CST 2022 lvm2-libs-2.03.15-0.1.20211115git4a1f617.el9 BUILT: Tue Feb 8 02:56:52 PM CST 2022 SCENARIO - entry_deletion_w_missing_mpath_device: Test stale devicesfile entry deletion using missing mpath devices (bug 2040482#c2) WARNING: This scenario will end up repartitioning your device! multipath /dev/sdc adding entry to the devices file for /dev/mapper/mpatha1 creating PV on hayes-01 using device /dev/mapper/mpatha1 pvcreate --yes -ff /dev/mapper/mpatha1 Physical volume "/dev/mapper/mpatha1" successfully created. Remove the backing mpath device and attempt to remove and re-add the device file entry for /dev/mapper/mpatha1 multipath -f mpatha multipath -W successfully reset wwids Using gpt label Disk size: 1907199 MB Num partitions: 1 Adding new primary partition: (40, 3905945559) = 1907199 MB Committing changes lvmdevices --deldev /dev/mapper/mpatha1 Devices file mpath_uuid part1-mpath-36d094660575ece002291b9e01bad8691 PVID mBCuq4JaUnN3hnwAi0ggQtCzWs6zb0lb last seen on /dev/mapper/mpatha1 not found. SCENARIO - altered_pvid_check_and_repair: Test the discovery and repair of an altered pvid in devicesfile entry (bug 2039977|2040482) Copying out blanked system.devices file to begin with /tmp/system1227.devices -> hayes-01:/etc/lvm/devices/system.devices adding entry to the devices file for /dev/sdc1 path:/dev/sdc1 Altered entry: IDTYPE=sys_wwid IDNAME=naa.6d094660575ece002291b9e01bad8691 DEVNAME=/dev/sdc1 PVID=c0rrup7HQrZNds PART=1 Copying out altered system.devices file to hayes-01 /tmp/system760.devices -> hayes-01:/etc/lvm/devices/system.devices lvmdevices --check Device /dev/sdc1 has PVID mBCuq4JaUnN3hnwAi0ggQtCzWs6zb0lb (devices file c0rrup7HQrZNds) Updates needed for devices file. lvmdevices --update Updated devices file to version 1.1.468 1.1.467 == 1.1.468 lvmdevices --deldev /dev/sdc1 Marking Verified:Tested with the current rpms. 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 A few of these scenarios are still not fixed/supported with --check|--update yet, but the main issues associated with this bug are I believe. ./devicesfile --devices /dev/sdc1 /dev/sde1 /dev/sdd1 /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1 -r /usr/tests/sts-rhel8.6 --node hayes-02 --testplan | grep 2040482 entry_deletion_w_missing_loopback_device -- Test stale devicesfile entry deletion using missing loopback devices (bug 2040482#c2) entry_deletion_w_missing_mpath_device -- Test stale devicesfile entry deletion using missing mpath devices (bug 2040482#c2) altered_partition_check_and_repair -- Test the discovery and repair of an altered partition value in devicesfile entry bugs 2039977|2040482 and --adddev segfault bugs 2040491|2040937 altered_pvid_check_and_repair -- Test the discovery and repair of an altered pvid in devicesfile entry (bug 2039977|2040482) altered_pvid_w_pv_label_present_check_and_repair -- Test for the alteration of the devicesfiles pvid when a pv label exists (2039977|2040482) altered_devname_check_and_repair -- Test the discovery and repair of an altered devname in devicesfile entry (bug 2039977|2040482) altered_devname_w_pv_label_present_check_and_repair -- Test for the alteration of the devicesfiles devname when a pv label exists (2039977|2040482) SCENARIO - altered_pvid_check_and_repair: Test the discovery and repair of an altered pvid in devicesfile entry (bug 2039977|2040482) Copying out blanked system.devices file to begin with /tmp/system1592.devices -> hayes-02:/etc/lvm/devices/system.devices adding entry to the devices file for /dev/sdc1 path:/dev/sdc1 Altered entry: IDTYPE=sys_wwid IDNAME=naa.6d094660650d1e0022bd29ee1e0945a8 DEVNAME=/dev/sdc1 PVID=c0rrup7HQrZNds PART=1 Copying out altered system.devices file to hayes-02 /tmp/system1827.devices -> hayes-02:/etc/lvm/devices/system.devices lvmdevices --check Device /dev/sdc1 has no PVID (devices file c0rrup7HQrZNds) Updates needed for devices file. lvmdevices --update Updated devices file to version 1.1.23 1.1.22 == 1.1.23 lvmdevices --deldev /dev/sdc1 SCENARIO - entry_deletion_w_missing_mpath_device: Test stale devicesfile entry deletion using missing mpath devices (bug 2040482#c2) WARNING: This scenario will end up repartitioning your device! multipath /dev/sdc adding entry to the devices file for /dev/mapper/mpatha1 creating PV on hayes-02 using device /dev/mapper/mpatha1 pvcreate --yes -ff /dev/mapper/mpatha1 Physical volume "/dev/mapper/mpatha1" successfully created. Remove the backing mpath device and attempt to remove and re-add the device file entry for /dev/mapper/mpatha1 multipath -f mpatha multipath -W successfully reset wwids Using gpt label Disk size: 1907199 MB Num partitions: 1 Adding new primary partition: (40, 3905945559) = 1907199 MB Committing changes lvmdevices --deldev /dev/mapper/mpatha1 Devices file mpath_uuid part1-mpath-36d094660650d1e0022bd29ee1e0945a8 PVID OEfoz3N45zwOhexVtmX9VZWpES7Az9DN last seen on /dev/mapper/mpatha1 not found. SCENARIO - altered_partition_check_and_repair: Test the discovery and repair of an altered partition value in devicesfile entry bugs 2039977|2040482 and --adddev segfault bugs 2040491|2040937 Copying out blanked system.devices file to begin with /tmp/system1418.devices -> hayes-02:/etc/lvm/devices/system.devices lvmdevices --adddev /dev/sdc1 Altered entry: IDTYPE=sys_wwid IDNAME=naa.6d094660650d1e0022bd29ee1e0945a8 DEVNAME=/dev/sdc1 PVID=OEfoz3N45zwOhexVtmX9VZWpES7Az9DN PART=9 Copying out altered system.devices file to hayes-02 /tmp/system1219.devices -> hayes-02:/etc/lvm/devices/system.devices lvmdevices --check Devices file sys_wwid naa.6d094660650d1e0022bd29ee1e0945a8 PVID OEfoz3N45zwOhexVtmX9VZWpES7Az9DN last seen on /dev/sdc1 not found. lvmdevices should have properly added /dev/sdc1 entry lvmdevices should have properly returned non zero for a check issue lvmdevices --update No update for devices file is needed. lvmdevices should have updated the partition change back lvmdevices --adddev /dev/sdc1 Devices file sys_wwid naa.6d094660650d1e0022bd29ee1e0945a8 PVID OEfoz3N45zwOhexVtmX9VZWpES7Az9DN last seen on /dev/sdc1 not found. WARNING: adding device /dev/sdc1 with PVID OEfoz3N45zwOhexVtmX9VZWpES7Az9DN which is already used for missing device. WARNING: adding device /dev/sdc1 with idname naa.6d094660650d1e0022bd29ee1e0945a8 which is already used for missing device. Checking for segfault notification (bug 2040491|2040937) 1.1.28 == 1.1.29 Altered entry: IDTYPE=sys_wwid IDNAME=naa.6d094660650d1e0022bd29ee1e0945a8 DEVNAME=/dev/sdc1 PVID=OEfoz3N45zwOhexVtmX9VZWpES7Az9DN PART=1 Copying out altered system.devices file to hayes-02 /tmp/system651.devices -> hayes-02:/etc/lvm/devices/system.devices lvmdevices --deldev /dev/sdc1 SCENARIO - entry_deletion_w_missing_loopback_device: Test stale devicesfile entry deletion using missing loopback devices (bug 2040482#c2) 50+0 records in 50+0 records out 52428800 bytes (52 MB, 50 MiB) copied, 0.0262522 s, 2.0 GB/s adding entry to the devices file for /dev/loop0 creating PV on hayes-02 using device /dev/loop0 pvcreate --yes -ff /dev/loop0 Physical volume "/dev/loop0" successfully created. Remove the backing loop device and attempt to remove and re-add the device file entry for /dev/loop0 lvmdevices --deldev /dev/loop0 Devices file loop_file /tmp/loopback.658795.547 PVID nCDwLagTlIto1EA6YNImxLKYHM5KEJzy last seen on /dev/loop0 not found. SCENARIO - altered_pvid_w_pv_label_present_check_and_repair: Test for the alteration of the devicesfiles pvid when a pv label exists (2039977|2040482) Copying out blanked system.devices file to begin with /tmp/system1594.devices -> hayes-02:/etc/lvm/devices/system.devices 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. Altered entry: IDTYPE=sys_wwid IDNAME=naa.6d094660650d1e0022bd29ee1e0945a8 DEVNAME=/dev/sdc1 PVID=c0rrup7HQrZNds PART=1 Copying out altered system.devices file to hayes-02 /tmp/system478.devices -> hayes-02:/etc/lvm/devices/system.devices path:/dev/sdc1 lvmdevices --check Device /dev/sdc1 has PVID KjxyNJq6R0017yzJunxtcITmG3ZCkWc0 (devices file c0rrup7HQrZNds) Updates needed for devices file. lvmdevices --update Updated devices file to version 1.1.36 1.1.35 == 1.1.36 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 - altered_devname_w_pv_label_present_check_and_repair: Test for the alteration of the devicesfiles devname when a pv label exists (2039977|2040482) Copying out blanked system.devices file to begin with /tmp/system83.devices -> hayes-02:/etc/lvm/devices/system.devices 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. Altered entry: IDTYPE=sys_wwid IDNAME=naa.6d094660650d1e0022bd29ee1e0945a8 DEVNAME=/dev/sdc PVID=Vv64TugVo2b7fC62qv21cg7TsOKOGyG2 PART=1 Copying out altered system.devices file to hayes-02 /tmp/system1498.devices -> hayes-02:/etc/lvm/devices/system.devices path:/dev/sdc1 lvmdevices --check Device /dev/sdc1 has updated name (devices file /dev/sdc) Updates needed for devices file. lvmdevices --update Updated devices file to version 1.1.41 1.1.40 == 1.1.41 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 - altered_devname_check_and_repair: Test the discovery and repair of an altered devname in devicesfile entry (bug 2039977|2040482) Copying out blanked system.devices file to begin with /tmp/system293.devices -> hayes-02:/etc/lvm/devices/system.devices adding entry to the devices file for /dev/sdc1 path:/dev/sdc1 Altered entry: IDTYPE=sys_wwid IDNAME=naa.6d094660650d1e0022bd29ee1e0945a8 DEVNAME=/dev/sdz1 PVID=. PART=1 Copying out altered system.devices file to hayes-02 /tmp/system1231.devices -> hayes-02:/etc/lvm/devices/system.devices lvmdevices --check Device /dev/sdc1 has updated name (devices file /dev/sdz1) Updates needed for devices file. lvmdevices --update Updated devices file to version 1.1.45 1.1.44 == 1.1.45 lvmdevices --deldev /dev/sdc1 Marking VERIFIED based on comment #6 run on the latest build. 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 |