diff --git a/SOURCES/0030.patch b/SOURCES/0030.patch new file mode 100644 index 0000000..34bc80e --- /dev/null +++ b/SOURCES/0030.patch @@ -0,0 +1,81 @@ +From 2bfe8c53280b6c1e18339dddc5bb60b062cad5bb Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Wed, 8 Dec 2021 14:04:25 -0600 +Subject: [PATCH] revert(lvm): remove snapshot feature + +The feature of managing lvm snapshots has no known +recent usage. It is unknown if it works. The lvm +developers do not wish to maintain or support it. + +(cherry picked from commit 1549d5e89818603e1aa6dd8a40981222f59f1548) + +Resolves: #2037955 +--- + modules.d/90lvm/lvm_scan.sh | 39 ++++----------------------------------- + 1 file changed, 4 insertions(+), 35 deletions(-) + +diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh +index c42f97d5..43601ad1 100755 +--- a/modules.d/90lvm/lvm_scan.sh ++++ b/modules.d/90lvm/lvm_scan.sh +@@ -7,8 +7,6 @@ type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh + + VGS=$(getargs rd.lvm.vg -d rd_LVM_VG=) + LVS=$(getargs rd.lvm.lv -d rd_LVM_LV=) +-SNAPSHOT=$(getargs rd.lvm.snapshot -d rd_LVM_SNAPSHOT=) +-SNAPSIZE=$(getargs rd.lvm.snapsize -d rd_LVM_SNAPSIZE=) + + # shellcheck disable=SC2174 + [ -d /etc/lvm ] || mkdir -m 0755 -p /etc/lvm +@@ -31,17 +29,10 @@ if [ ! -e /etc/lvm/lvm.conf ]; then + echo '}' + + # establish LVM locking +- if [ -n "$SNAPSHOT" ]; then +- echo 'global {' +- echo ' locking_type = 1' +- echo ' use_lvmetad = 0' +- echo '}' +- else +- echo 'global {' +- echo ' locking_type = 4' +- echo ' use_lvmetad = 0' +- echo '}' +- fi ++ echo 'global {' ++ echo ' locking_type = 4' ++ echo ' use_lvmetad = 0' ++ echo '}' + } > /etc/lvm/lvm.conf + lvmwritten=1 + fi +@@ -90,28 +81,6 @@ unset extraargs + + export LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1 + +-if [ -n "$SNAPSHOT" ]; then +- # HACK - this should probably be done elsewhere or turned into a function +- # Enable read-write LVM locking +- sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 1/' /etc/lvm/lvm.conf +- +- # Expected SNAPSHOT format ":" +- ORIG_LV=${SNAPSHOT%%:*} +- SNAP_LV=${SNAPSHOT##*:} +- +- info "Removing existing LVM snapshot $SNAP_LV" +- lvm lvremove --force "$SNAP_LV" 2>&1 | vinfo +- +- # Determine snapshot size +- if [ -z "$SNAPSIZE" ]; then +- SNAPSIZE=$(lvm lvs --noheadings --units m --options lv_size "$ORIG_LV") +- info "No LVM snapshot size provided, using size of $ORIG_LV ($SNAPSIZE)" +- fi +- +- info "Creating LVM snapshot $SNAP_LV ($SNAPSIZE)" +- lvm lvcreate -s -n "$SNAP_LV" -L "$SNAPSIZE" "$ORIG_LV" 2>&1 | vinfo +-fi +- + if [ -n "$LVS" ]; then + info "Scanning devices $lvmdevs for LVM logical volumes $LVS" + lvm lvscan $lvm_ignorelockingfailure 2>&1 | vinfo + diff --git a/SOURCES/0031.patch b/SOURCES/0031.patch new file mode 100644 index 0000000..b035a32 --- /dev/null +++ b/SOURCES/0031.patch @@ -0,0 +1,71 @@ +From 441c2c211d3c0fd8003ebb7622f44f360e75cbcd Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Wed, 8 Dec 2021 14:07:42 -0600 +Subject: [PATCH] revert(lvm): remove lvmetad config changes + +Remove support for modifying use_lvmetad and locking_type +settings in lvm.conf for lvm versions 2.2.*. Recent lvm +versions (2.3.*) do not include lvmetad or locking_type. +This cleanup simplifies code maintenance. + +To use the lvm module with older versions (2.2), a user +would need to ensure that lvmetad settings are disabled +in the initrd's lvm.conf rather than relying on the lvm +dracut mode to modify their lvm.conf. + +(cherry picked from commit f6f393f550625e3e1c968ef32d6d7bdd90f51d73) + +Resolves: #2037955 +--- + modules.d/90lvm/lvm_scan.sh | 3 --- + modules.d/90lvm/module-setup.sh | 14 -------------- + 2 files changed, 17 deletions(-) + +diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh +index 43601ad1..80382407 100755 +--- a/modules.d/90lvm/lvm_scan.sh ++++ b/modules.d/90lvm/lvm_scan.sh +@@ -28,10 +28,7 @@ if [ ! -e /etc/lvm/lvm.conf ]; then + echo '"r/.*/" ]' + echo '}' + +- # establish LVM locking + echo 'global {' +- echo ' locking_type = 4' +- echo ' use_lvmetad = 0' + echo '}' + } > /etc/lvm/lvm.conf + lvmwritten=1 +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index e1e6c582..0bb491f3 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -61,10 +61,6 @@ install() { + if [[ $hostonly ]] || [[ $lvmconf == "yes" ]]; then + if [[ -f $dracutsysrootdir/etc/lvm/lvm.conf ]]; then + inst_simple -H /etc/lvm/lvm.conf +- # FIXME: near-term hack to establish read-only locking; +- # use command-line lvm.conf editor once it is available +- sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 4/' "${initdir}/etc/lvm/lvm.conf" +- sed -i -e 's/\(^[[:space:]]*\)use_lvmetad[[:space:]]*=[[:space:]]*[[:digit:]]/\1use_lvmetad = 0/' "${initdir}/etc/lvm/lvm.conf" + fi + + export LVM_SUPPRESS_FD_WARNINGS=1 +@@ -82,16 +78,6 @@ install() { + unset LVM_SUPPRESS_FD_WARNINGS + fi + +- if ! [[ -e ${initdir}/etc/lvm/lvm.conf ]]; then +- mkdir -p "${initdir}/etc/lvm" +- { +- echo 'global {' +- echo 'locking_type = 4' +- echo 'use_lvmetad = 0' +- echo '}' +- } > "${initdir}/etc/lvm/lvm.conf" +- fi +- + inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules + + # Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut! + diff --git a/SOURCES/0032.patch b/SOURCES/0032.patch new file mode 100644 index 0000000..c579d3c --- /dev/null +++ b/SOURCES/0032.patch @@ -0,0 +1,46 @@ +From a755fb8c0dfa28d57b7bbe900d3bde5d2fe4789f Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Wed, 8 Dec 2021 14:11:13 -0600 +Subject: [PATCH] revert(lvm): remove 69-dm-lvm-metad.rules + +This udev rule runs pvscan to autoactivate VGs, which dracut +does not want to do, and previously disabled by editing the +rule file and commenting out lines. + +This also stops /dev/disk/by-id/lvm-pv-uuid-* symlinks from +being created in the initrd. + +(cherry picked from commit 50e74668434d935db649b5690dc2158b0f87d91c) + +Resolves: #2037955 +--- + modules.d/90lvm/module-setup.sh | 15 +-------------- + 1 file changed, 1 insertion(+), 14 deletions(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index 0bb491f3..25be0133 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -78,20 +78,7 @@ install() { + unset LVM_SUPPRESS_FD_WARNINGS + fi + +- inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules +- +- # Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut! +- if [[ -f ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ]]; then +- if grep -q SYSTEMD_WANTS "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules; then +- sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' \ +- "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules +- sed -i -e 's/^ENV{ID_MODEL}=.*//' "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules +- sed -i -e 's/^ENV{SYSTEMD_WANTS}+\?=.*//' "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules +- else +- sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' \ +- "${initdir}"/lib/udev/rules.d/69-dm-lvm-metad.rules +- fi +- fi ++ inst_rules 11-dm-lvm.rules + + # Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules + # files, but provides the one below: + diff --git a/SOURCES/0033.patch b/SOURCES/0033.patch new file mode 100644 index 0000000..0859dfd --- /dev/null +++ b/SOURCES/0033.patch @@ -0,0 +1,32 @@ +From bf521a1e968472b74288046830bd2c85e3cbb023 Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Wed, 8 Dec 2021 14:14:27 -0600 +Subject: [PATCH] fix(lvm): replace --partial option + +The --partial option will activate a linear (or other) LV +without segments for missing devices, which is unlikely to +be useful. The intention was to activate raid LVs in a useful +form while missing devices, which is specified with the option +--activationmode degraded. + +(cherry picked from commit 97543cca48dfde849396f11c83f9c320e1b91c46) + +Resolves: #2037955 +--- + modules.d/90lvm/64-lvm.rules | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules +index 65f65249..ca718ce0 100644 +--- a/modules.d/90lvm/64-lvm.rules ++++ b/modules.d/90lvm/64-lvm.rules +@@ -15,7 +15,7 @@ PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] && + 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+="/sbin/initqueue --timeout --name 51-lvm_scan --onetime --unique /sbin/lvm_scan --activationmode degraded" + RUN+="/bin/sh -c '>/tmp/.lvm_scan-%k;'" + + LABEL="lvm_end" + diff --git a/SOURCES/0034.patch b/SOURCES/0034.patch new file mode 100644 index 0000000..7f3e5fd --- /dev/null +++ b/SOURCES/0034.patch @@ -0,0 +1,85 @@ +From 9ab4c18355df1e55c39ca96f27ddb9b540054286 Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Wed, 8 Dec 2021 14:43:58 -0600 +Subject: [PATCH] feat(lvm): update lvm command options + +Drop checking for options that have been available for +at least ten years. This simplifies code maintenance. + +Add the new --nohints option (when available) to disable +the use of hints which is not useful during startup. + +(cherry picked from commit c0a54f2993b1d3c2101202c274a41f925445d54b) + +Resolves: #2037955 +--- + modules.d/90lvm/lvm_scan.sh | 41 ++++++++++++++++++++++------------------- + 1 file changed, 22 insertions(+), 19 deletions(-) + +diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh +index 80382407..00143bff 100755 +--- a/modules.d/90lvm/lvm_scan.sh ++++ b/modules.d/90lvm/lvm_scan.sh +@@ -59,39 +59,42 @@ min=$2 + sub=${3%% *} + sub=${sub%%\(*} + +-lvm_ignorelockingfailure="--ignorelockingfailure" +-lvm_quirk_args="--ignorelockingfailure --ignoremonitoring" +- +-check_lvm_ver 2 2 57 "$maj" "$min" "$sub" \ +- && lvm_quirk_args="$lvm_quirk_args --poll n" +- +-if check_lvm_ver 2 2 65 "$maj" "$min" "$sub"; then +- lvm_quirk_args=" --sysinit $extraargs" +-fi +- +-if check_lvm_ver 2 2 221 "$maj" "$min" "$sub"; then +- lvm_quirk_args=" $extraargs" +- unset lvm_ignorelockingfailure +-fi +- ++# For lvchange and vgchange use --sysinit which: ++# disables polling (--poll n) ++# ignores monitoring (--ignoremonitoring) ++# ignores locking failures (--ignorelockingfailure) ++# disables hints (--nohints) ++# ++# For lvscan and vgscan: ++# disable locking (--nolocking) ++# disable hints (--nohints) ++ ++activate_args="--sysinit $extraargs" + unset extraargs + + export LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1 + ++scan_args="--nolocking" ++ ++check_lvm_ver 2 3 14 "$maj" "$min" "$sub" \ ++ && scan_args="$scan_args --nohints" ++ + if [ -n "$LVS" ]; then + info "Scanning devices $lvmdevs for LVM logical volumes $LVS" +- lvm lvscan $lvm_ignorelockingfailure 2>&1 | vinfo ++ # shellcheck disable=SC2086 ++ lvm lvscan $scan_args 2>&1 | vinfo + for LV in $LVS; do + # shellcheck disable=SC2086 +- lvm lvchange --yes -K -ay $lvm_quirk_args "$LV" 2>&1 | vinfo ++ lvm lvchange --yes -K -ay $activate_args "$LV" 2>&1 | vinfo + done + fi + + if [ -z "$LVS" ] || [ -n "$VGS" ]; then + info "Scanning devices $lvmdevs for LVM volume groups $VGS" +- lvm vgscan $lvm_ignorelockingfailure 2>&1 | vinfo + # shellcheck disable=SC2086 +- lvm vgchange -ay $lvm_quirk_args $VGS 2>&1 | vinfo ++ lvm vgscan $scan_args 2>&1 | vinfo ++ # shellcheck disable=SC2086 ++ lvm vgchange -ay $activate_args $VGS 2>&1 | vinfo + fi + + if [ "$lvmwritten" ]; then + diff --git a/SOURCES/0035.patch b/SOURCES/0035.patch new file mode 100644 index 0000000..a01de8d --- /dev/null +++ b/SOURCES/0035.patch @@ -0,0 +1,143 @@ +From ded4448ba98305b6f0c58cdd67a8b0de9a3db0d3 Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Wed, 8 Dec 2021 15:16:03 -0600 +Subject: [PATCH] feat(lvm): use generated filter when none is set + +Previously, the lvm device filter generated by dracut +would not be used if any lvm.conf file existed in the +initrd. Change this so that the generated filter will +be used when the included lvm.conf has no filter set. + +(cherry picked from commit 7ffc5e388bcce20785803825bdd260c3c854b34f) + +Resolves: #2037955 +--- + modules.d/90lvm/lvm_scan.sh | 91 +++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 75 insertions(+), 16 deletions(-) + +diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh +index 00143bff..bda265f6 100755 +--- a/modules.d/90lvm/lvm_scan.sh ++++ b/modules.d/90lvm/lvm_scan.sh +@@ -10,6 +10,7 @@ LVS=$(getargs rd.lvm.lv -d rd_LVM_LV=) + + # shellcheck disable=SC2174 + [ -d /etc/lvm ] || mkdir -m 0755 -p /etc/lvm ++[ -d /run/lvm ] || mkdir -m 0755 -p /run/lvm + # build a list of devices to scan + lvmdevs=$( + for f in /tmp/.lvm_scan-*; do +@@ -18,22 +19,6 @@ lvmdevs=$( + done + ) + +-if [ ! -e /etc/lvm/lvm.conf ]; then +- { +- echo 'devices {' +- printf ' filter = [ ' +- for dev in $lvmdevs; do +- printf '"a|^/dev/%s$|", ' "$dev" +- done +- echo '"r/.*/" ]' +- echo '}' +- +- echo 'global {' +- echo '}' +- } > /etc/lvm/lvm.conf +- lvmwritten=1 +-fi +- + check_lvm_ver() { + maj=$1 + min=$2 +@@ -47,6 +32,75 @@ check_lvm_ver() { + return 1 + } + ++no_lvm_conf_filter() { ++ if [ ! -e /etc/lvm/lvm.conf ]; then ++ return 0 ++ fi ++ ++ if [ -e /run/lvm/initrd_no_filter ]; then ++ return 0 ++ fi ++ ++ if [ -e /run/lvm/initrd_filter ]; then ++ return 1 ++ fi ++ ++ if [ -e /run/lvm/initrd_global_filter ]; then ++ return 1 ++ fi ++ ++ # 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=") ++ 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=") ++ if [ -n "$global_filter" ]; then ++ printf '%s\n' "$global_filter" > /run/lvm/initrd_global_filter ++ return 1 ++ fi ++ ++ # /etc/lvm/lvm.conf exists with no filter setting ++ true > /run/lvm/initrd_no_filter ++ return 0 ++} ++ ++# If no lvm.conf exists, create a basic one with a global section. ++if [ ! -e /etc/lvm/lvm.conf ]; then ++ { ++ echo 'global {' ++ echo '}' ++ } > /etc/lvm/lvm.conf ++ lvmwritten=1 ++fi ++ ++# Save the original lvm.conf before appending a filter setting. ++if [ ! -e /etc/lvm/lvm.conf.orig ]; then ++ cp /etc/lvm/lvm.conf /etc/lvm/lvm.conf.orig ++fi ++ ++# If the original lvm.conf does not contain a filter setting, ++# then generate a filter and append it to the original lvm.conf. ++# The filter is generated from the list PVs that have been seen ++# so far (each has been processed by the lvm udev rule.) ++if no_lvm_conf_filter; then ++ { ++ echo 'devices {' ++ printf ' filter = [ ' ++ for dev in $lvmdevs; do ++ printf '"a|^/dev/%s$|", ' "$dev" ++ done ++ echo '"r/.*/" ]' ++ echo '}' ++ } > /etc/lvm/lvm.conf.filter ++ lvmfilter=1 ++ cat /etc/lvm/lvm.conf.orig /etc/lvm/lvm.conf.filter > /etc/lvm/lvm.conf ++fi ++ + # hopefully this output format will never change, e.g.: + # LVM version: 2.02.53(1) (2009-09-25) + OLDIFS=$IFS +@@ -99,8 +153,13 @@ fi + + if [ "$lvmwritten" ]; then + rm -f -- /etc/lvm/lvm.conf ++elif [ "$lvmfilter" ]; then ++ # revert filter that was appended to existing lvm.conf ++ cp /etc/lvm/lvm.conf.orig /etc/lvm/lvm.conf ++ rm -f -- /etc/lvm/lvm.conf.filter + fi + unset lvmwritten ++unset lvmfilter + + udevadm settle + + diff --git a/SOURCES/0036.patch b/SOURCES/0036.patch new file mode 100644 index 0000000..bd56033 --- /dev/null +++ b/SOURCES/0036.patch @@ -0,0 +1,56 @@ +From ec9b1e872ad3be0ec9440927a0f702c7bfa80932 Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Fri, 10 Dec 2021 12:51:26 -0600 +Subject: [PATCH] feat(lvm): only run lvchange for LV that is seen on devices + +Change the command listing LVs from lvscan to lvs, and list +only the LV names that are being activated. Before attempting +to activate an LV, check that that LV name appears in the +lvs command output. This avoids wasting time running an +lvchange command that we know will fail. + +(cherry picked from commit 1af46743195422aaebcde5c508a5dd479eff51ea) + +Resolves: #2037955 +--- + modules.d/90lvm/lvm_scan.sh | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh +index bda265f6..89f077ae 100755 +--- a/modules.d/90lvm/lvm_scan.sh ++++ b/modules.d/90lvm/lvm_scan.sh +@@ -119,7 +119,7 @@ sub=${sub%%\(*} + # ignores locking failures (--ignorelockingfailure) + # disables hints (--nohints) + # +-# For lvscan and vgscan: ++# For lvs and vgscan: + # disable locking (--nolocking) + # disable hints (--nohints) + +@@ -136,10 +136,20 @@ check_lvm_ver 2 3 14 "$maj" "$min" "$sub" \ + if [ -n "$LVS" ]; then + info "Scanning devices $lvmdevs for LVM logical volumes $LVS" + # shellcheck disable=SC2086 +- lvm lvscan $scan_args 2>&1 | vinfo ++ LVSLIST=$(lvm lvs $scan_args --noheading -o lv_full_name,segtype $LVS) ++ info "$LVSLIST" ++ ++ # Only attempt to activate an LV if it appears in the lvs output. + for LV in $LVS; do +- # shellcheck disable=SC2086 +- lvm lvchange --yes -K -ay $activate_args "$LV" 2>&1 | vinfo ++ if strstr "$LVSLIST" "$LV"; then ++ # This lvchange is expected to fail if all PVs used by ++ # the LV are not yet present. Premature/failed lvchange ++ # could be avoided by reporting if an LV is complete ++ # from the lvs command above and skipping this lvchange ++ # if the LV is not lised as complete. ++ # shellcheck disable=SC2086 ++ lvm lvchange --yes -K -ay $activate_args "$LV" 2>&1 | vinfo ++ fi + done + fi + + diff --git a/SOURCES/0037.patch b/SOURCES/0037.patch new file mode 100644 index 0000000..bcf12d4 --- /dev/null +++ b/SOURCES/0037.patch @@ -0,0 +1,39 @@ +From f659bd462a6b605c36a89fa205b41bf8f55c41be Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Fri, 17 Dec 2021 12:14:51 -0600 +Subject: [PATCH] fix(lvm): restore setting LVM_MD_PV_ACTIVATED + +The 69-dm-lvm-metad.rules udev rule has been removed from +the initrd, because it's been dropped by recent upstream +lvm versions, and it never performed any primary function +within the initrd. But, it did have the job of setting +LVM_MD_PV_ACTIVATED=1 for active md devices used by PVs. +That step needs to be restored, and is now included in +64-lvm.rules. + +(cherry picked from commit 164e5ebb1199ea3e3d641ce402d8257f0055a529) + +Resolves: #2037955 +--- + modules.d/90lvm/64-lvm.rules | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules +index ca718ce0..1ad49111 100644 +--- a/modules.d/90lvm/64-lvm.rules ++++ b/modules.d/90lvm/64-lvm.rules +@@ -6,6 +6,14 @@ + + SUBSYSTEM!="block", GOTO="lvm_end" + ACTION!="add|change", GOTO="lvm_end" ++ ++# If the md device is active (indicated by array_state), then set the flag ++# LVM_MD_PV_ACTIVATED=1 indicating that the md device for the PV is ready ++# to be used. The lvm udev rule running in root will check that this flag ++# is set before it will process the md device (it wants to avoid ++# processing an md device that exists but is not yet ready to be used.) ++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" diff --git a/SPECS/dracut.spec b/SPECS/dracut.spec index 43fc935..1a6a7ec 100644 --- a/SPECS/dracut.spec +++ b/SPECS/dracut.spec @@ -5,7 +5,7 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 30.git20220216 +%define dist_free_release 38.git20220322 Name: dracut Version: 055 @@ -58,6 +58,14 @@ Patch26: 0026.patch Patch27: 0027.patch Patch28: 0028.patch Patch29: 0029.patch +Patch30: 0030.patch +Patch31: 0031.patch +Patch32: 0032.patch +Patch33: 0033.patch +Patch34: 0034.patch +Patch35: 0035.patch +Patch36: 0036.patch +Patch37: 0037.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -511,6 +519,16 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog +* Tue Mar 22 2022 Pavel Valena - 055-38.git20220322 +- revert(lvm): remove snapshot feature +- revert(lvm): remove lvmetad config changes +- revert(lvm): remove 69-dm-lvm-metad.rules +- fix(lvm): replace --partial option +- feat(lvm): update lvm command options +- feat(lvm): use generated filter when none is set +- feat(lvm): only run lvchange for LV that is seen on devices +- fix(lvm): restore setting LVM_MD_PV_ACTIVATED + * Wed Feb 16 2022 Pavel Valena - 055-30.git20220216 - fix(shutdown): be robust against forced shutdown - 95resume: only exclude this module, when swap is netdev