Thin provision is a mechanism that you can allocate a lvm volume which has
a large virtual size for file systems but actually in a small physical
size. The physical size can be autoextended in use if thin pool reached a
threshold specified in /etc/lvm/lvm.conf.
There are 2 works should be handled when enable lvm2 thinp for kdump:
1) Check if the dump target device or directory is thinp device.
2) Monitor the thin pool and autoextend its size when it reached the threshold
during kdump.
According to my testing, the memory consumption procedure for lvm2 thinp is the thin pool
size-autoextend phase. For fedora and rhel9, the default crashkernel value is enough. But
for rhel8, the default crashkernel value 1G-4G:160M is not enough, so it should
be handled particularly.
v1 -> v2:
1) Modified the usage of lvs cmd when check if target is lvm2 thinp
device.
2) Removed the sync flag way of mounting for lvm2 thinp target
during kdump, use "sync -f vmcore" to force sync data, and handle
the error if fails.
v2 -> v3:
1) Removed "sync -f vmcore" patch out of the patch set, for it is
addressing an issue which is not specifically to lvm2 thinp support for
kdump.
v3 -> v4:
1) Removed lvm2-monitor.service, implemented the monitor service with
a loop function within a shell script instead.
2) Add lvm2 thinp support for dump_raw, for it is addressing the similar
issue as dump_fs.
3) Dave suggested me to implement the lvm2 thin support in dracut
modules instead of kexec-tools. If you are OK with the loop-function-shell-script
technical way, I will give a try to migrate it to dracut.
Tao Liu (4):
Add lvm2 thin provision dump target checker
Add monitor_lvm2_thinp_autoextend script for kdump when lvm2 thinp
enabled
Add lvm2 thinp support for dump_raw
lvm.conf should be check modified if lvm2 thinp enabled
dracut-kdump.sh | 24 +++++++++++++++-----
dracut-module-setup.sh | 11 +++++++++-
dracut-monitor_lvm2_thinp_autoextend | 33 ++++++++++++++++++++++++++++
kdump-lib-initramfs.sh | 10 +++++++++
kdump-lib.sh | 10 +++++++++
kdumpctl | 1 +
kexec-tools.spec | 2 ++
7 files changed, 85 insertions(+), 6 deletions(-)
create mode 100644 dracut-monitor_lvm2_thinp_autoextend
--
2.33.1