Bug 2139512
| Summary: | vgimportdevices should skip incomplete VGs and only exit with an error when no devs are imported | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | David Teigland <teigland> |
| 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: | unspecified | ||
| Priority: | unspecified | CC: | agk, cluster-qe, cmarthal, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, thornber, zkabelac |
| Version: | 8.5 | Keywords: | Triaged |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.03.14-9.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 2124970 | Environment: | |
| Last Closed: | 2023-05-16 09:11:54 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: | 2124970 | ||
| Bug Blocks: | |||
|
Comment 2
David Teigland
2022-11-02 18:48:01 UTC
pushed to rhel-8.8.0 branch https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e5f5e2988377c0f014b30a60709685c19c6d3bf0 https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=19093e37557ae6a94392dcf207b3566a7d3defea Marking Verified:Tested in the latest 8.8 rpms. kernel-4.18.0-442.el8.v2 BUILT: Mon Dec 5 14:06:21 CST 2022 lvm2-2.03.14-9.el8 BUILT: Thu Dec 8 10:40:55 CST 2022 lvm2-libs-2.03.14-9.el8 BUILT: Thu Dec 8 10:40:55 CST 2022 SCENARIO - vgimportdevices_from_incomplete_vg_w_removed_entry_and_offline_device: Test importing from incomplete VG with an offline and removed entry device (bug 2124970) Ensuring lvm2-lvmdbusd is started to verify bug 2085078 adding entry to the devices file for /dev/sdg creating PV on hayes-01 using device /dev/sdg pvcreate --yes -ff /dev/sdg Physical volume "/dev/sdg" successfully created. adding entry to the devices file for /dev/sdh1 creating PV on hayes-01 using device /dev/sdh1 pvcreate --yes -ff /dev/sdh1 Physical volume "/dev/sdh1" successfully created. adding entry to the devices file for /dev/sdc1 creating PV on hayes-01 using device /dev/sdc1 pvcreate --yes -ff /dev/sdc1 Physical volume "/dev/sdc1" successfully created. adding entry to the devices file for /dev/sdi1 creating PV on hayes-01 using device /dev/sdi1 pvcreate --yes -ff /dev/sdi1 Physical volume "/dev/sdi1" successfully created. adding entry to the devices file for /dev/sdf1 creating PV on hayes-01 using device /dev/sdf1 pvcreate --yes -ff /dev/sdf1 Physical volume "/dev/sdf1" successfully created. creating VG on hayes-01 using PV(s) /dev/sdg /dev/sdh1 vgcreate incomplete /dev/sdg /dev/sdh1 Volume group "incomplete" successfully created creating VG on hayes-01 using PV(s) /dev/sdc1 /dev/sdi1 vgcreate complete /dev/sdc1 /dev/sdi1 Volume group "complete" successfully created * Removing the devicesfile completely * pvscan PV /dev/sdg VG incomplete lvm2 [<1.82 TiB / <1.82 TiB free] PV /dev/sdh1 VG incomplete lvm2 [<1.82 TiB / <1.82 TiB free] PV /dev/sdc1 VG complete lvm2 [1020.00 MiB / 1020.00 MiB free] PV /dev/sdi1 VG complete lvm2 [<1.82 TiB / <1.82 TiB free] PV /dev/sdf1 lvm2 [<1.82 TiB] Total: 5 [<7.28 TiB] / in use: 4 [<5.46 TiB] / in no VG: 1 [<1.82 TiB] Disabling device sdg on hayes-01 'echo offline > /sys/block/sdg/device/state' pvscan WARNING: Couldn't find device with uuid mXiYze-7yQ4-7y28-Q4Kv-rcf7-E3Zg-NaLf2a. WARNING: VG incomplete is missing PV mXiYze-7yQ4-7y28-Q4Kv-rcf7-E3Zg-NaLf2a (last written to /dev/sdg). PV [unknown] VG incomplete lvm2 [<1.82 TiB / <1.82 TiB free] PV /dev/sdh1 VG incomplete lvm2 [<1.82 TiB / <1.82 TiB free] PV /dev/sdc1 VG complete lvm2 [1020.00 MiB / 1020.00 MiB free] PV /dev/sdi1 VG complete lvm2 [<1.82 TiB / <1.82 TiB free] PV /dev/sdf1 lvm2 [<1.82 TiB] Total: 5 [<7.28 TiB] / in use: 4 [<5.46 TiB] / in no VG: 1 [<1.82 TiB] * Only devices in the complete VG are to be restored * vgimportdevices -a Not importing devices for VG incomplete with missing PV mXiYze7yQ47y28Q4Kvrcf7E3ZgNaLf2a. Added 2 devices to devices file. removing vg complete from hayes-01 Volume group "complete" successfully removed * No devices will be restored with just the incomplete VG remaining* vgimportdevices -a Not importing devices for VG incomplete with missing PV mXiYze7yQ47y28Q4Kvrcf7E3ZgNaLf2a. Enabling device sdg on hayes-01 'echo running > /sys/block/sdg/device/state' Verify that all removed devices file entries can be recreated using vgimportdevices Checking devicesfile entries for the incomplete VG adding entry to the devices file for /dev/sdg adding entry to the devices file for /dev/sdh1 Checking devicesfile entries for the complete VG IDTYPE=sys_wwid IDNAME=naa.6d094660575ece002291b9e01bad8691 DEVNAME=/dev/sdc1 PVID=cV1gEcEMiI68xVBH61z3iq35KyoojzHQ PART=1 IDTYPE=sys_wwid IDNAME=naa.6d094660575ece002291be7e6227ca72 DEVNAME=/dev/sdi1 PVID=EbTj8LRqOy6xB9dzXGbmGBUqnsS3Npqv PART=1 removing vg incomplete from hayes-01 Volume group "incomplete" successfully removed adding entry to the devices file for /dev/sdg removing pv /dev/sdg on hayes-01 Labels on physical volume "/dev/sdg" successfully wiped. removing entry from the devices file for /dev/sdg adding entry to the devices file for /dev/sdh1 removing pv /dev/sdh1 on hayes-01 Labels on physical volume "/dev/sdh1" successfully wiped. removing entry from the devices file for /dev/sdh1 adding entry to the devices file for /dev/sdc1 removing pv /dev/sdc1 on hayes-01 Labels on physical volume "/dev/sdc1" successfully wiped. removing entry from the devices file for /dev/sdc1 adding entry to the devices file for /dev/sdi1 removing pv /dev/sdi1 on hayes-01 Labels on physical volume "/dev/sdi1" successfully wiped. removing entry from the devices file for /dev/sdi1 adding entry to the devices file for /dev/sdf1 removing pv /dev/sdf1 on hayes-01 Labels on physical volume "/dev/sdf1" successfully wiped. removing entry from the devices file for /dev/sdf1 Searching for MThreadRunner: exception in syslog 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-2023:3048 |