lvm.conf should be check modified if lvm2 thinp enabled

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@redhat.com>
Reviewed-by: Philipp Rudo <prudo@redhat.com>
This commit is contained in:
Tao Liu 2022-10-08 15:41:40 +08:00 committed by Coiby Xu
parent 0a5b71d123
commit 10ca970940
2 changed files with 2 additions and 0 deletions

View File

@ -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"
# Read kdump config in well formated style
kdump_read_conf()

View File

@ -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