Unnamed repository
Go to file
Pratyush Anand 7aeeb1d17e kdumpctl: force rebuild in case of file system is modified
kdumpctl passes --device argument if dump target is a raw device. It passes
--mount argument if dump target is either mounted as nfs or as a bulk
device. When dump target device is a root device then it does not pass any
of the above two arguments.

After kdumpctl restart, if there is any change in file system which needs
different dracut arguments, then initramfs must be rebuild.

Modification in filesystem for a raw target does not affect dracut
arguments. So, we do not consider to check any modification if raw target
was specified in kdump.conf.

We might need to change dracut arguments if there is some changes in nfs
and ssh target related files. However, we do not consider them in this
patch.

We mainly consider changes in bulk target specified in kdump.conf. We also
consider changes in bulk and nfs file system, if there was no dump target
specified in kdump.conf but dump path is mounting such file systems.

So the initramfs must be rebuild if, either dump target's persistent path
or it's mount point or its file system type changes. If there is no dump
target specified then, both dump path and root path must mount same device,
otherwise rebuild should be triggered.

Some of the examples when we can need a rebuild:

-- "dump target" is specified as one of ext[234], xfs or btrfs. But after
kdump initramfs building its UUID is changed by reformatting.
-- "dump target" is specified as file system type fs1 (say ext3). But after
kdump initramfs building, user change it to fs2 (say ext4), probably by
a mkfs.ext4 executing on the target device.
-- "dump target" is not specified, but "dump path" mounts a device which
is different than device for root path and either UUID or file system type
is modified after kdump initramfs build.
-- "dump target" is not specified, but "dump path" mounts a nfs device and
nfs host path changes after kdump initramfs build.

Some testing:

Initial conditions:
-- No dump target specified
-- dump path (/var/crash) and root(/) are on same device
-- kdumpctl was already executed once after last modification in
/etc/kdump.conf

	# kdumpctl restart
		No rebuild
	# mkfs.ext2 /dev/md0;mount /dev/md0  /var/crash/;kdumpctl restart
		Rebuilt because "Detected change in File System"
	# kdumpctl restart
		No rebuild
	# umount /var/crash/;kdumpctl restart
		Rebuilt because "Detected change in File System"
	# kdumpctl restart
		No rebuild
	# mount /dev/md0  /var/crash/;kdumpctl restart
		Rebuilt because "Detected change in File System"
	# umount /var/crash;mkfs.ext4 /dev/md0;
	# mount /dev/md0  /var/crash/;kdumpctl restart
		Rebuilt because "Detected change in File System"

	# umount /var/crash;mkfs.ext4 /dev/mapper/fedora-swap
	# mount /dev/mapper/fedora-swap  /var/crash/
	# kdumpctl restart
		Rebuilt because "Detected change in File System"
	# umount /var/crash;mkfs.btrfs /dev/mapper/fedora-swap -f
	# mount /dev/mapper/fedora-swap  /var/crash/
	# kdumpctl restart
		Rebuilt because "Detected change in File System"
	# kdumpctl restart
		No rebuild
	# umount /var/crash/;kdumpctl restart
		Rebuilt because "Detected change in File System"
	# mount /dev/mapper/fedora-swap  /var/crash/;kdumpctl restart
		Rebuilt because "Detected change in File System"

	# umount /var/crash;mkfs.minix /dev/md0
	# mount /dev/md0  /var/crash/; kdumpctl restart
		Rebuilt because "Detected change in File System"
	# kdumpctl restart
		No rebuild
	# umount /var/crash/;kdumpctl restart
		Rebuilt because "Detected change in File System"

	# mount 192.168.1.16:/nfsroot /var/crash/;kdumpctl restart
		Rebuilt because "Detected change in File System"
	# umount /var/crash/;kdumpctl restart
		Rebuilt because "Detected change in File System"
	# mount 192.168.1.16:/nfsroot /var/crash/;kdumpctl restart
		Rebuilt because "Detected change in File System"
	# kdumpctl restart
		No rebuild
	# umount /var/crash;mount 192.168.1.12:/nfsroot /var/crash/
	# kdumpctl restart
		Rebuilt because "Detected change in File System"
	# umount /var/crash/;kdumpctl restart
		Rebuilt because "Detected change in File System"

Added "raw /dev/md0" in /etc/kdump.conf
	# kdumpctl restart
		Rebuilt because "Detected change in /etc/kdump.conf"
	# mkfs.ext4 /dev/md0 ;kdumpctl restart
		No rebuild

Added "ext4 /dev/md0" in /etc/kdump.conf
	# mkfs.ext4 /dev/md0;mount /dev/md0 /mnt
	# mkdir /mnt/var;mkdir /mnt/var/crash; kdumpctl restart
		Rebuilt because "Detected change in /etc/kdump.conf"
	# umount /mnt;mkfs.ext4 /dev/md0;mount /dev/md0 /mnt
	# mkdir /mnt/var;mkdir /mnt/var/crash; kdumpctl restart
		Rebuilt because "Detected change in /etc/kdump.conf"

Most of the credits for this patch goes to Xunlei Pang <xpang@redhat.com>
for suggesting several improvements.

Signed-off-by: Pratyush Anand <panand@redhat.com>
Acked-by: Xunlei Pang <xlpang@redhat.com>
Acked-by: Baoquan He <xlpang@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2016-05-12 09:54:17 +08:00
anaconda-addon Rename the subpackage kdump-anaconda-addon 2014-05-22 18:32:43 +08:00
.gitignore Release 2.0.12-3 2016-03-29 17:14:19 +08:00
98-kexec.rules udev-rules: Restart kdump service on cpu ADD/REMOVE events 2014-09-15 21:55:07 +08:00
README README: Add a README file 2014-04-02 10:45:36 +08:00
dracut-kdump-capture.service Introduce kdump capture service 2014-08-05 13:13:32 +08:00
dracut-kdump-emergency.service kdump-emergency.service: executable uses absolute path 2014-08-28 13:05:56 +08:00
dracut-kdump-error-handler.service Introduce kdump error handling service 2014-08-05 13:13:32 +08:00
dracut-kdump-error-handler.sh Revert "execute kdump_post after do_default_action" 2015-04-08 15:50:16 +08:00
dracut-kdump.sh dracut-kdump: Use the first filtered ip address as dump directory 2015-07-28 12:42:17 +08:00
dracut-module-setup.sh Remove duplicate prefix path ${initdir} 2015-10-19 10:36:37 +08:00
dracut-monitor_dd_progress monitor-dd-progress fix 2013-06-25 16:45:59 +08:00
fadump-howto.txt kdump: Add firmware-assisted dump howto document 2014-07-28 13:03:51 +08:00
kdump-dep-generator.sh kdump-dep-generator: Add kdump service dependencies on the fly 2014-04-17 11:27:31 +08:00
kdump-in-cluster-environment.txt Add fence_kdump support for generic clusters 2014-04-03 14:43:06 +08:00
kdump-lib-initramfs.sh use "systemctl reboot -f" for reboot action 2015-12-11 15:20:54 +08:00
kdump-lib.sh mkdumprd: move to_dev_name() & get_persistent_dev() to kdump-lib.sh 2016-05-12 09:53:51 +08:00
kdump.conf kdump.conf: renew the path section 2014-04-17 11:27:31 +08:00
kdump.conf.5 kdump.conf: renew the path section 2014-04-17 11:27:31 +08:00
kdump.service make kdump work when kernel crash after shutdown 2015-06-03 21:10:34 +08:00
kdump.sysconfig Remove kernel param "quiet" from kdump kernel cmdline 2015-12-11 15:18:31 +08:00
kdump.sysconfig.i386 Remove kernel param "quiet" from kdump kernel cmdline 2015-12-11 15:18:31 +08:00
kdump.sysconfig.ppc64 Remove kernel param "quiet" from kdump kernel cmdline 2015-12-11 15:18:31 +08:00
kdump.sysconfig.ppc64le Remove kernel param "quiet" from kdump kernel cmdline 2015-12-11 15:18:31 +08:00
kdump.sysconfig.s390x Remove kernel param "quiet" from kdump kernel cmdline 2015-12-11 15:18:31 +08:00
kdump.sysconfig.x86_64 Remove kernel param "quiet" from kdump kernel cmdline 2015-12-11 15:18:31 +08:00
kdumpctl kdumpctl: force rebuild in case of file system is modified 2016-05-12 09:54:17 +08:00
kdumpctl.8 kdumpctl: Add man page for kdumpctl 2015-08-19 14:15:34 +08:00
kexec-kdump-howto.txt kexec-kdump-howto:Add introduction of parallel dumping 2015-10-19 10:37:08 +08:00
kexec-tools-2.0.3-disable-kexec-test.patch Disable kexec_test 2012-01-21 16:56:07 +08:00
kexec-tools-2.0.12-Pass-struct-mem_sym-into-machine_apply_elf_rel.patch ppc64le: fix kexec hang due to ppc64 elf abi breakage 2016-03-25 10:35:44 +08:00
kexec-tools-2.0.12-Properly-align-powerpc64-.toc.patch ppc64le: fix kexec hang due to ppc64 elf abi breakage 2016-03-25 10:35:44 +08:00
kexec-tools-2.0.12-ppc64-purgatory-Handle-local-symbols-in-ELF-ABIv2.patch ppc64le: fix kexec hang due to ppc64 elf abi breakage 2016-03-25 10:35:44 +08:00
kexec-tools.spec Release 2.0.12-3 2016-03-29 17:14:19 +08:00
mkdumprd mkdumprd: move to_dev_name() & get_persistent_dev() to kdump-lib.sh 2016-05-12 09:53:51 +08:00
mkdumprd.8 Remove comma which is redundant 2013-02-16 15:19:41 +08:00
rhcrashkernel-param rhcrashkernel-param: echo crashkernel=auto for rhel7 2012-08-20 15:01:47 +08:00
sources Release 2.0.12-3 2016-03-29 17:14:19 +08:00
zanata-notes.txt Add a notes for zanata process 2012-12-05 01:23:09 -05:00

README

Adding a patch to kexec-tools
=============================
There is a mailing list kexec@lists.fedoraproject.org where all the dicussion
related to fedora kexec-tools happen. All the patches are posted there for
inclusion and committed to kexec-tools after review.

So if you want your patches to be included in fedora kexec-tools package,
post these to kexec@lists.fedoraproject.org.

One can subscribe to list and browse through archives here.

https://admin.fedoraproject.org/mailman/listinfo/kexec