23ef29
# This file contains a series of commands to perform (in order) in the kdump
23ef29
# kernel after a kernel crash in the crash kernel(1st kernel) has happened.
23ef29
#
23ef29
# Directives in this file are only applicable to the kdump initramfs, and have
23ef29
# no effect once the root filesystem is mounted and the normal init scripts are
23ef29
# processed.
23ef29
#
23ef29
# Currently, only one dump target and path can be specified.  If the dumping to
23ef29
# the configured target fails, the default action which can be configured via
23ef29
# the "default" directive will be performed.
23ef29
#
23ef29
# Supported options:
23ef29
#
23ef29
# raw <partition>
23ef29
#           - Will dd /proc/vmcore into <partition>.
23ef29
#             Use persistent device names for partition devices,
23ef29
#             such as /dev/vg/<devname>.
23ef29
#
23ef29
# nfs <nfs mount>
23ef29
#           - Will mount nfs to <mnt>, and copy /proc/vmcore to
23ef29
#             <mnt>/<path>/%HOST-%DATE/, supports DNS.
23ef29
#
23ef29
# ssh <user@server>
23ef29
#           - Will scp /proc/vmcore to <user@server>:<path>/%HOST-%DATE/,
23ef29
#             supports DNS.
23ef29
#             NOTE: make sure the user has write permissions on the server.
23ef29
#
23ef29
# sshkey <path>
23ef29
#           - Will use the sshkey to do ssh dump.
23ef29
#             Specify the path of the ssh key to use when dumping
23ef29
#             via ssh. The default value is /root/.ssh/kdump_id_rsa.
23ef29
#
23ef29
# <fs type> <partition>
23ef29
#           - Will mount -t <fs type> <partition> <mnt>, and copy
23ef29
#             /proc/vmcore to <mnt>/<path>/%DATE/.
23ef29
#             NOTE: <partition> can be a device node, label or uuid.
23ef29
#             It's recommended to use persistent device names
23ef29
#             such as /dev/vg/<devname>.
23ef29
#             Otherwise it's suggested to use label or uuid.
23ef29
#
23ef29
# path <path>
23ef29
#           - "path" represents the file system path in which vmcore
23ef29
#             will be saved.  If a dump target is specified in
23ef29
#             kdump.conf, then "path" is relative to the specified
23ef29
#             dump target.
23ef29
#
23ef29
#             Interpretation of "path" changes a bit if the user didn't
23ef29
#             specify any dump target explicitly in kdump.conf.  In this
23ef29
#             case, "path" represents the absolute path from root. The
23ef29
#             dump target and adjusted path are arrived at automatically
23ef29
#             depending on what's mounted in the current system.
23ef29
#
23ef29
#             Ignored for raw device dumps.  If unset, will use the default
23ef29
#             "/var/crash".
23ef29
#
23ef29
# core_collector <command> <options>
23ef29
#           - This allows you to specify the command to copy
23ef29
#             the vmcore.  The default is makedumpfile, which on
23ef29
#             some architectures can drastically reduce vmcore size.
23ef29
#             See /sbin/makedumpfile --help for a list of options.
23ef29
#             Note that the -i and -g options are not needed here,
23ef29
#             as the initrd will automatically be populated with a
23ef29
#             config file appropriate for the running kernel.
23ef29
#             The default core_collector for raw/ssh dump is:
23ef29
#             "makedumpfile -F -l --message-level 1 -d 31".
23ef29
#             The default core_collector for other targets is:
23ef29
#             "makedumpfile -l --message-level 1 -d 31".
23ef29
#
23ef29
#             "makedumpfile -F" will create a flattened vmcore.
23ef29
#             You need to use "makedumpfile -R" to rearrange the dump data to
23ef29
#             a normal dumpfile readable with analysis tools.  For example:
23ef29
#             "makedumpfile -R vmcore < vmcore.flat".
23ef29
#
23ef29
#             For core_collector format details, you can refer to
23ef29
#             kexec-kdump-howto.txt or kdump.conf manpage.
23ef29
#
23ef29
# kdump_post <binary | script>
23ef29
#           - This directive allows you to run a executable binary
23ef29
#             or script after the vmcore dump process terminates.
23ef29
#             The exit status of the current dump process is fed to
23ef29
#             the executable binary or script as its first argument.
23ef29
#
23ef29
# kdump_pre <binary | script>
23ef29
#           - Works like the "kdump_post" directive, but instead of running
23ef29
#             after the dump process, runs immediately before it.
23ef29
#             Exit status of this binary is interpreted as follows:
23ef29
#             0 - continue with dump process as usual
23ef29
#             non 0 - reboot the system
23ef29
#
23ef29
# extra_bins <binaries | shell scripts>
23ef29
#           - This directive allows you to specify additional binaries or
23ef29
#             shell scripts to be included in the kdump initrd.
23ef29
#             Generally they are useful in conjunction with a kdump_post
23ef29
#             or kdump_pre binary or script which depends on these extra_bins.
23ef29
#
23ef29
# extra_modules <module(s)>
23ef29
#           - This directive allows you to specify extra kernel modules
23ef29
#             that you want to be loaded in the kdump initrd.
23ef29
#             Multiple modules can be listed, separated by spaces, and any
23ef29
#             dependent modules will automatically be included.
23ef29
#
23ef29
# default <reboot | halt | poweroff | shell | dump_to_rootfs>
23ef29
#           - Action to perform in case dumping fails.
23ef29
#             reboot:   Reboot the system.
23ef29
#             halt:     Halt the system.
23ef29
#             poweroff: Power down the system.
23ef29
#             shell:    Drop to a bash shell.
23ef29
#                       Exiting the shell reboots the system.
23ef29
#             dump_to_rootfs:  Dump vmcore to rootfs from initramfs context and
23ef29
#                       reboot. Useful when non-root dump target is specified.
23ef29
#             The default option is "reboot".
23ef29
#
23ef29
# force_rebuild <0 | 1>
23ef29
#           - By default, kdump initrd will only be rebuilt when necessary.
23ef29
#             Specify 1 to force rebuilding kdump initrd every time when kdump
23ef29
#             service starts.
23ef29
#
23ef29
# force_no_rebuild <0 | 1>
23ef29
#           - By default, kdump initrd will be rebuilt when necessary.
23ef29
#             Specify 1 to bypass rebuilding of kdump initrd.
23ef29
#
23ef29
#             force_no_rebuild and force_rebuild options are mutually
23ef29
#             exclusive and they should not be set to 1 simultaneously.
23ef29
#
23ef29
# override_resettable <0 | 1>
23ef29
#           - Usually an unresettable block device can't be a dump target.
23ef29
#             Specifying 1 when you want to dump even though the block
23ef29
#             target is unresettable
23ef29
#             By default, it is 0, which will not try dumping destined to fail.
23ef29
#
23ef29
# dracut_args <arg(s)>
23ef29
#           - Pass extra dracut options when rebuilding kdump initrd.
23ef29
#
23ef29
# fence_kdump_args <arg(s)>
23ef29
#           - Command line arguments for fence_kdump_send (it can contain
23ef29
#             all valid arguments except hosts to send notification to).
23ef29
#
23ef29
# fence_kdump_nodes <node(s)>
23ef29
#           - List of cluster node(s) except localhost, separated by spaces,
23ef29
#             to send fence_kdump notifications to.
23ef29
#             (this option is mandatory to enable fence_kdump).
23ef29
#
23ef29
23ef29
#raw /dev/vg/lv_kdump
23ef29
#ext4 /dev/vg/lv_kdump
23ef29
#ext4 LABEL=/boot
23ef29
#ext4 UUID=03138356-5e61-4ab3-b58e-27507ac41937
23ef29
#nfs my.server.com:/export/tmp
23ef29
#ssh user@my.server.com
23ef29
#sshkey /root/.ssh/kdump_id_rsa
23ef29
path /var/crash
23ef29
core_collector makedumpfile -l --message-level 1 -d 31
23ef29
#core_collector scp
23ef29
#kdump_post /var/crash/scripts/kdump-post.sh
23ef29
#kdump_pre /var/crash/scripts/kdump-pre.sh
23ef29
#extra_bins /usr/bin/lftp
23ef29
#extra_modules gfs2
23ef29
#default shell
23ef29
#force_rebuild 1
23ef29
#force_no_rebuild 1
23ef29
#dracut_args --omit-drivers "cfg80211 snd" --add-drivers "ext2 ext3"
23ef29
#fence_kdump_args -p 7410 -f auto -c 0 -i 10
23ef29
#fence_kdump_nodes node1 node2