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 2033737 - 64-lvm.rules needs to handle md devices for root on lvm on md to work
Summary: 64-lvm.rules needs to handle md devices for root on lvm on md to work
Keywords:
Status: CLOSED DUPLICATE of bug 2037955
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: dracut
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
: 2039091 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-17 18:00 UTC by David Teigland
Modified: 2022-02-04 16:12 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-04 16:12:24 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-106133 0 None None None 2021-12-17 18:02:44 UTC

Description David Teigland 2021-12-17 18:00:01 UTC
Description of problem:

In RHEL9 the lvm package has replaced 69-dm-lvm-metad.rules with 69-dm-lvm.rules, implementing a new style of lvm autoactivation.

In RHEL8, dracut included 69-dm-lvm-metad.rules in the initrd where it set LVM_MD_PV_ACTIVATED=1.  This allowed root-on-lvm-on-md to work (see bug 2032993).

RHEL9 is currently missing the LVM_MD_PV_ACTIVATED=1 step in the initrd since 69-dm-lvm-metad.rules is gone.  So, root-on-lvm-on-md is broken, and leads to boot timeouts when an LV is used that requires autoactivation (commonly for home.)

To fix this in RHEL9, the 64-lvm.rules file in dracut needs to be patched to include this line:

KERNEL=="md[0-9]*", ACTION=="change", ENV{ID_FS_TYPE}=="LVM2_member", ENV{LVM_MD_PV_ACTIVATED}!="1", TEST=="md/array_state", ENV{LVM_MD_PV_ACTIVATED}="1"

Here's what my full working 64-lvm.rules file looks like:

SUBSYSTEM!="block", GOTO="lvm_end"
ACTION!="add|change", GOTO="lvm_end"
KERNEL=="md[0-9]*", ACTION=="change", ENV{ID_FS_TYPE}=="LVM2_member", ENV{LVM_MD_PV_ACTIVATED}!="1", TEST=="md/array_state", ENV{LVM_MD_PV_ACTIVATED}="1"
# Also don't process disks that are slated to be a multipath device
ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="lvm_end"
KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end"
ENV{ID_FS_TYPE}!="LVM?_member", GOTO="lvm_end"

PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] && exit 0; done; exit 1;' ", \
    GOTO="lvm_end"

RUN+="/sbin/initqueue --settled --onetime --unique /sbin/lvm_scan"
RUN+="/sbin/initqueue --timeout --name 51-lvm_scan --onetime --unique /sbin/lvm_scan --partial"
RUN+="/bin/sh -c '>/tmp/.lvm_scan-%k;'"

LABEL="lvm_end"


(I am working on a larger set of changes to the dracut lvm module upstream which will hopefully be suitable for rhel9.  This will remove the dracut code that attempts to include the non-existent 69-dm-lvm-metad.rules in the initrd, among other things.)

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 farrotin 2022-01-07 07:17:38 UTC
back from PTO and revisiting bugs opened for Stream 9 .. Do we have some kind of ETA for when new pkg will be available for Stream 9 users ?

Comment 2 David Teigland 2022-01-12 14:52:33 UTC
*** Bug 2039091 has been marked as a duplicate of this bug. ***

Comment 3 Gordon Messmer 2022-01-12 16:12:37 UTC
I can confirm that the change suggested in the description fixes bug 2039091.

Comment 4 farrotin 2022-01-18 16:10:54 UTC
just curious about status now : when can we expect newer dracut/lvm2 pkgs to be built and available for people to consume ? (just trying to plan when we can just deploy stream 9 for centos stream infra itself, which doesn't work as long as all pending bug reports aren't closed) :)

Comment 5 David Tardon 2022-02-04 16:12:24 UTC
We intend to backport the new lvm stuff for 9.0, so let's close this in favor of bug 2037955.

*** This bug has been marked as a duplicate of bug 2037955 ***


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