On Sat, Oct 08, 2022 at 03:41:40PM +0800, Tao Liu wrote:
lvm2 relies on /etc/lvm/lvm.conf to determine its behaviour. The
important configs such as thin_pool_autoextend_threshold and
thin_pool_autoextend_percent will be used during kdump in 2nd
kernel. So if the file is modified, the initramfs should be
rebuild to include the latest.
Signed-off-by: Tao Liu <ltao(a)redhat.com>
---
kdump-lib-initramfs.sh | 1 +
kdumpctl | 1 +
2 files changed, 2 insertions(+)
diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh
index 5cba8ce..d11a55c 100755
--- a/kdump-lib-initramfs.sh
+++ b/kdump-lib-initramfs.sh
@@ -8,6 +8,7 @@ DEFAULT_SSHKEY="/root/.ssh/kdump_id_rsa"
KDUMP_CONFIG_FILE="/etc/kdump.conf"
FENCE_KDUMP_CONFIG_FILE="/etc/sysconfig/fence_kdump"
FENCE_KDUMP_SEND="/usr/libexec/fence_kdump_send"
+LVM_CONF="/etc/lvm/lvm.conf"
Note currently shellcheck sounded a false alarm[1],
In kdump-lib-initramfs.sh line 12:
LVM_CONF="/etc/lvm/lvm.conf"
^------^ SC2034 (warning): LVM_CONF appears unused. Verify use (or export if used
externally).
For those who may concern, I've created an issue for shellcheck [2].
[1]
https://github.com/coiby/kexec-tools/actions/runs/3326514791/jobs/5500297931
[2]
https://github.com/koalaman/shellcheck/issues/2617
# Read kdump config in well formated style
kdump_read_conf()
diff --git a/kdumpctl b/kdumpctl
index c7efa2c..4357cda 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -390,6 +390,7 @@ check_files_modified()
# HOOKS is mandatory and need to check the modification time
files="$files $HOOKS"
+ is_lvm2_thinp_dump_target && files="$files $LVM_CONF"
check_exist "$files" && check_executable "$EXTRA_BINS" ||
return 2
for file in $files; do
--
2.33.1
--
Best regards,
Coiby