Bug 2037955

Summary: update lvm module
Product: Red Hat Enterprise Linux 9 Reporter: David Teigland <teigland>
Component: dracutAssignee: Pavel Valena <pvalena>
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: dracut-maint-list, dtardon, farrotin, fsumsal, jpazdziora, lnykryn, pvalena, pvlasin
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dracut-055-38.git20220322.el9_0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2066639 (view as bug list) Environment:
Last Closed: 2022-05-17 16:04:12 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:    
Bug Blocks: 2066639    

Description David Teigland 2022-01-06 21:55:06 UTC
Description of problem:

Pull upstream lvm updates into rhel9.  The current patch set is here (not yet merged): https://github.com/dracutdevs/dracut/pull/1673

The final commit in the series ("restore setting LVM_MD_PV_ACTIVATED") is required to boot systems with root on lvm on md: https://github.com/dracutdevs/dracut/pull/1673/commits/3c21679c946a4035085a39676d10989cf9c56a9c

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 Tardon 2022-02-04 16:12:24 UTC
*** Bug 2033737 has been marked as a duplicate of this bug. ***

Comment 6 Lukáš Nykrýn 2022-03-14 13:31:45 UTC
To quote Brian Stinson:

It seems that we're missing this to support mdraid layouts made by the
installer. Do we have a plan to get this in as a Blocker/Exception? or
do we have some documentation prepared for customers who might want to
use mdraid devices for 9.0GA?

Comment 7 Pavel Valena 2022-03-16 14:17:10 UTC
Prepared and pre-verified: https://github.com/redhat-plumbers/dracut-rhel9/pull/22

Comment 8 Pavel Valena 2022-03-21 12:29:51 UTC
I've prepared a Draft PR, which includes scratch-builds:
https://gitlab.com/redhat/centos-stream/rpms/dracut/-/merge_requests/8

Comment 12 Jan Pazdziora 2022-03-25 12:25:50 UTC
Hello,

we see new messages

dracut-initqueue:   WARNING: File locking is disabled.
dracut-initqueue:   Configuration node devices/global_filter not found
dracut-initqueue:   Configuration node devices/filter not found

in journal. Can we assume these are direct result of changes made for this bugzilla and expected?

Thank you,

Jan

Comment 13 David Teigland 2022-03-25 15:48:31 UTC
(In reply to Jan Pazdziora from comment #12)
> we see new messages
> 
> dracut-initqueue:   WARNING: File locking is disabled.

This is expected, a result of of using --nolocking.  (I'll probably suppress that message from lvm commands in the next release.)

> dracut-initqueue:   Configuration node devices/global_filter not found
> dracut-initqueue:   Configuration node devices/filter not found

These are expected from the two "lvm config" commands.  I didn't realize these would be logged in the journal, so I'll find a way to suppress these in the next release.

> in journal. Can we assume these are direct result of changes made for this
> bugzilla and expected?

Yes, these are from the recent dracut lvm changes.

Comment 14 Jan Pazdziora 2022-03-25 15:55:28 UTC
Great, thanks for the confirmation.

Comment 15 David Teigland 2022-03-25 22:44:36 UTC
(In reply to David Teigland from comment #13)
> > dracut-initqueue:   Configuration node devices/global_filter not found
> > dracut-initqueue:   Configuration node devices/filter not found
> 
> These are expected from the two "lvm config" commands.  I didn't realize
> these would be logged in the journal, so I'll find a way to suppress these
> in the next release.

Changing this in lvm would require a new option, so a simpler solution is this patch which I'll send upstream:

diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh
index 89f077aef994..b1b4e4ad3b6c 100755
--- a/modules.d/90lvm/lvm_scan.sh
+++ b/modules.d/90lvm/lvm_scan.sh
@@ -52,13 +52,13 @@ no_lvm_conf_filter() {
     # Save lvm config results in /run to avoid running
     # lvm config commands for every PV that's scanned.
 
-    filter=$(lvm config devices/filter | grep "$filter=")
+    filter=$(lvm config devices/filter 2>/dev/null | grep "$filter=")
     if [ -n "$filter" ]; then
         printf '%s\n' "$filter" > /run/lvm/initrd_filter
         return 1
     fi
 
-    global_filter=$(lvm config devices/global_filter | grep "$global_filter=")
+    global_filter=$(lvm config devices/global_filter 2>/dev/null | grep "$global_filter=")
     if [ -n "$global_filter" ]; then
         printf '%s\n' "$global_filter" > /run/lvm/initrd_global_filter
         return 1

Comment 17 errata-xmlrpc 2022-05-17 16:04:12 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: dracut), 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:4070