On Fri, May 27, 2022 at 02:45:15PM +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@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 92404f4..8ea2d66 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"
# Read kdump config in well formated style kdump_read_conf() diff --git a/kdumpctl b/kdumpctl index 6188d47..b157eb8 100755 --- a/kdumpctl +++ b/kdumpctl @@ -383,6 +383,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"
this probably should be merged with first patch. I was wondering how is_lvm2_thinp_dump_target() is being used. I now see that you are using it to add /etc/lvm/lvm.conf file to initramfs.
I would have thought that /etc/lvm/lvm.conf will be needed in initramfs if rootfs is on a lvm volume. Thinp is just one of the use cases. May be that's the not the case. No dracut module includes lvm.conf even if rootfs is on an lvm volume.
Vivek
for file in $files; do
2.33.1