Skip to content

kdump initramfs gets rebuilt whenever kdump.service is restarted for btrfs kdump target #138

@coiby

Description

@coiby

I notice the kdump initramfs get rebuilt whenever kdump.serivce is restarted,

The xtrace logs shows kdumpctl is misled to believe there is a change in file system,

+ [[ /sysroot == /kdumproot/var ]]
+ dinfo 'Detected change in File System'

I think the problem is get_block_dump_target doesn't support btrfs subvolume thus it returns /sysroot instead of /kdumproot/var,

check_fs_modified()
{
	_target=$(get_block_dump_target)
        ....
	if echo "$_dracut_args" | grep -q -- "--mount"; then
		# shellcheck disable=SC2046
		set -- $(echo "$_dracut_args" | awk -F "--mount '" '{print $2}' | cut -d' ' -f1,2,3)
		_old_dev=$1
		_old_mntpoint=$2
		...
		[[ $_new_dev == "$_old_dev" && $_new_mntpoint == "$_old_mntpoint" && $_new_fstype == "$_old_fstype" ]] && return 0
	fi
	dinfo "Detected change in File System"
	return 1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions