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