From 10e0a513a41ea8e40af958aa8d71b154958af3cb Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Nov 11 2022 03:49:32 +0000 Subject: Add dependency of dracut lvmthinpool-monitor module upstream: fedora resolves: bz2083475 conflict: Yes, use "grep -q <<< $(cmd)" instead of "cmd | grep -q", because the latter will fail with strange reason. commit f11721077a5b1ade96d6326c1620d3da0e5eea18 Author: Tao Liu Date: Sat Oct 8 15:41:41 2022 +0800 Add dependency of dracut lvmthinpool-monitor module The 80lvmthinpool-monitor module is needed for monitor and autoextend the size of thin pool in 2nd kernel. The module was integrated in dracut version 057. If lvmthinpool-monitor module is not found, we will print a warning. Because we don't want to block the kdump process when the thin pool capacity is enough and no monitor-and-autoextend actually needed. Signed-off-by: Tao Liu Reviewed-by: Philipp Rudo Signed-off-by: Tao Liu --- diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index a3cbbe8..2e47943 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -40,6 +40,14 @@ depends() { _dep="$_dep ssh-client" fi + if is_lvm2_thinp_dump_target; then + if grep -q lvmthinpool-monitor <<< $(dracut --list-modules); then + add_opt_module lvmthinpool-monitor + else + dwarning "Required lvmthinpool-monitor modules is missing! Please upgrade dracut >= 057." + fi + fi + if [[ "$(uname -m)" == "s390x" ]]; then _dep="$_dep znet" fi