Features/NewMkdumprd

= New mkdumprd for kdump =

Summary
This is a replacement for mkdumprd of kexec-tools, to switch to dracut to generate the initrd for kdump kernel.

This feature was postponed in Fedora 16, because some feature needed in dracut was not done. Now the latest dracut has the thing we need, --mount, although it is still experimental.

Owner

 * Name: Cong Wang and Dave Young


 * Email:  or / ruyang@redhat.com

Current status
Working:
 * Targeted release: Fedora 17
 * Last updated: 2012-02-22
 * Percentage of completion: 90%
 * Dump to root filesystem
 * Dump to local filesystem (including multiple targets)
 * Part of configs in /etc/kdump.conf work:
 * path
 * core_collector 
 * extra_bins
 * extra_modules 
 * default 
 * Obsolete:
 * disk_timeout
 * link_delay
 * options
 * Dump to remote host via ssh
 * Depends on dracut ssh-client module (ruyang)
 * Dump to remote host via nfs
 * Depends on dracut nfs, network module and --mount
 * Depends on dracut nfs, network module and --mount

TODO:
 * Dump to raw block device
 * Implement full functionality of /etc/kdump.conf
 * Dump to multiple targets

Detailed Description
Currently in kexec-tools we use our own /sbin/mkdumprd to generate an initrd for kdump kernel. However, due to the natural complexity of making a new initrd, we have lots of burdens to maintain the mkdumprd code, we decide to switch to using dracut to generate kdump initrd. And hopefully, we can provide a distro-independent mkdumprd to upstream, as dracut itself is cross-distribution.

Benefit to Fedora
The main source of kexec-tools bugs is in mkdumprd, with this change, hopefully we will reduce the number of bugs of kexec-tools.

Scope
All functionality of /sbin/mkdumprd has to be implemented and tested in this new mkdumprd.

How To Test
Enable some of the following config lines in /etc/kdump.conf

ext3 LABEL=/boot
 * Dump to local file system

ext3 /dev/sda1

ext4 UUID=03138356-5e61-4ab3-b58e-27507ac41937

net my.server.com:/path
 * Dump to remote machines

net user@remote.server.com

raw /dev/sda5
 * Dump to raw block device

core_collector makedumpfile -c --message-level 1
 * Other configs

core_collector cp

kdump_post /var/crash/scripts/kdump-post.sh

extra_bins /bin/cp

disk_timeout 30

extra_modules gfs2

options modulename options

default shell/reboot/shutdown

Trigger a crash and see if the vmcore is dumped to the right place.

User Experience
Users should not notice the replacement, because we plan to provide full backward compatibility.

Dependencies
Dracut

Contingency Plan
Fallback to old /sbin/mkdumprd.

Documentation

 * kdump.conf: http://www.linuxcertif.com/man/5/kdump.conf/

Release Notes

 * /sbin/mkdumprd has been replaced by new code, which uses dracut to generate the initrd for kdump kernel.

Comments and Discussion
https://fedoraproject.org/wiki/Talk:Features/NewMkdumprd