diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh index cd34162..db501e9 100755 --- a/kdump-lib-initramfs.sh +++ b/kdump-lib-initramfs.sh @@ -152,3 +152,12 @@ is_fs_dump_target() { [ -n "$(kdump_get_conf_val "ext[234]\|xfs\|btrfs\|minix\|virtiofs")" ] } + +is_lvm2_thinp_device() +{ + _device_path=$1 + _lvm2_thin_device=$(lvm lvs -S 'lv_layout=sparse && lv_layout=thin' \ + --nosuffix --noheadings -o vg_name,lv_name "$_device_path" 2> /dev/null) + + [ -n "$_lvm2_thin_device" ] +} diff --git a/kdump-lib.sh b/kdump-lib.sh index 0e89268..0c57a38 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -116,6 +116,12 @@ is_dump_to_rootfs() [[ $(kdump_get_conf_val 'failure_action\|default') == dump_to_rootfs ]] } +is_lvm2_thinp_dump_target() +{ + _target=$(get_block_dump_target) + [ -n "$_target" ] && is_lvm2_thinp_device "$_target" +} + get_failure_action_target() { local _target