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 2139512 - vgimportdevices should skip incomplete VGs and only exit with an error when no devs are imported
Summary: vgimportdevices should skip incomplete VGs and only exit with an error when n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: lvm2
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 2124970
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-02 18:39 UTC by David Teigland
Modified: 2023-05-16 11:21 UTC (History)
10 users (show)

Fixed In Version: lvm2-2.03.14-9.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2124970
Environment:
Last Closed: 2023-05-16 09:11:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLUSTERQE-6285 0 None None None 2022-12-07 02:01:54 UTC
Red Hat Issue Tracker RHELPLAN-138140 0 None None None 2022-11-02 19:09:48 UTC
Red Hat Product Errata RHBA-2023:3048 0 None None None 2023-05-16 09:12:10 UTC

Comment 2 David Teigland 2022-11-02 18:48:01 UTC
I think this change could be relevant to upgrades from rhel8 to rhel9 when vgimportdevices -a may be used to prepare a devices file for the upgraded system.

Comment 6 Corey Marthaler 2022-12-14 00:08:45 UTC
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

Comment 11 errata-xmlrpc 2023-05-16 09:11:54 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-2023:3048


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