Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2030778

Summary: lvm2 fails to 'notice' luks devices
Product: Red Hat Enterprise Linux 9 Reporter: lejeczek <peljasz>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
lvm2 sub component: Activating existing Logical Volumes QA Contact: cluster-qe <cluster-qe>
Status: CLOSED NOTABUG Docs Contact:
Severity: urgent    
Priority: unspecified CC: agk, bstinson, heinzm, jbrassow, jwboyer, msnitzer, prajnoha, teigland, zkabelac
Version: CentOS StreamFlags: pm-rhel: mirror+
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-04 21:42:25 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:

Description lejeczek 2021-12-09 17:33:39 UTC
Description of problem:

Hi.

I have a NVMe disk (separate from boot drive) which is whole-luks-encrypted, then off that luks device I have pv -> vg -> lv

with version 2.03.14-2.el9 and device-mapper 1.02.181-2.el9
LVM misses/ignores the VG and 'vgcfgrestore' complains about missing UUID even then nothing actually is missing.

Workaround is to downgrade to:
device-mapper-1.02.181-1.el9.x86_64
lvm2-2.03.14-1.el9.x86_64
and all works as expected.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 David Teigland 2021-12-09 18:07:50 UTC
Most likely the luks disk is missing from the lvm devices file.  Run "lvmdevices" or cat /etc/lvm/devices/system.devices to check if the luks disk is missing.  To add it, run lvmdevices --adddev <luks disk> to add it to the set of devices lvm will use.

Comment 2 lejeczek 2021-12-09 18:37:51 UTC
How many of admins will stumble over it? Still should not have happened and a bug in my mind.

Comment 3 David Teigland 2021-12-09 19:08:23 UTC
Was this in fact the problem and solution?  If so, my next question is how you arrived at your rhel9 system, i.e. did you upgrade an existing system, and if so which version was it, or did you create a fresh rhel9 install using anaconda?  For the upgrade case, the system.devices file should not exist which will disable the devices file functionality.  For the a fresh installation, anaconda runs vgimportdevices -a, which should include any attached PVs into the new system.devices file.  If you attached the luks PV to the system after a fresh install, then it would not have been in the devices file.

Comment 4 lejeczek 2021-12-11 14:19:00 UTC
I did a fresh installation of CentOS 9 Stream (which this BZ if filed against) some time ago, perhaps about 3 weeks ago.
And yes I did add that luks disk only a few days ago.
From my (probably all admins/users) perspective it's much simpler - I get you can diagnose in the details the issue - lvm/dmsetup rpms updates and things break.

thanks, L.

Comment 5 David Teigland 2021-12-13 18:25:56 UTC
Often, new devices are attached to the system but do not actually belong to the system (they will often be passed to vms for example.)  So, the safe default is to only use devices when the admin has told lvm that it should.  This does introduce a new step when the attached devices are intended for the system.

I am always looking for new ideas about how to make this change easier for users to see and understand, and I'd be interested in any suggestions you have.  If lvm had logged a message in the journal that this new luks device was not included in system.devices, would that have helped?  The journal often has a lot of messages and it might be difficult to notice one.

Comment 6 David Teigland 2022-01-04 21:44:14 UTC
undo mistaken attempt at a new summary

Comment 7 lejeczek 2022-01-05 10:39:00 UTC
I'd think that perhaps 'rpm' logic would do some good if used when such a 'transition' happens between binaries/programs version - rpm at install/update time could take care of such a case/situation.