|
|
ab224c |
# Configures where to put the kdump /proc/vmcore files
|
|
|
ab224c |
#
|
|
|
ab224c |
# This file contains a series of commands to perform (in order) when a
|
|
|
ab224c |
# kernel crash has happened and the kdump kernel has been loaded. Directives in
|
|
|
ab224c |
# this file are only applicable to the kdump initramfs, and have no effect if
|
|
|
ab224c |
# the root filesystem is mounted and the normal init scripts are processed
|
|
|
ab224c |
#
|
|
|
ab224c |
# Currently only one dump target and path may be configured at once
|
|
|
ab224c |
# if the configured dump target fails, the default action will be preformed
|
|
|
ab224c |
# the default action may be configured with the default directive below. If the
|
|
|
ab224c |
# configured dump target succedes
|
|
|
ab224c |
#
|
|
|
ab224c |
# Basics commands supported are:
|
|
|
ab224c |
# raw <partition> - Will dd /proc/vmcore into <partition>.
|
|
|
ab224c |
# Use persistent device names for partition devices,
|
|
|
ab224c |
# such as /dev/vg/<devname>.
|
|
|
ab224c |
#
|
|
|
ab224c |
# nfs <nfs mount> - Will mount fs and copy /proc/vmcore to
|
|
|
ab224c |
# <mnt>/var/crash/%HOST-%DATE/, supports DNS.
|
|
|
ab224c |
#
|
|
|
ab224c |
# ssh <user@server> - Will scp /proc/vmcore to
|
|
|
ab224c |
# <user@server>:/var/crash/%HOST-%DATE/, supports DNS
|
|
|
ab224c |
# NOTE: make sure user has necessary write
|
|
|
ab224c |
# permissions on server
|
|
|
ab224c |
#
|
|
|
ab224c |
# sshkey <path> - Will use the sshkey to do ssh dump
|
|
|
ab224c |
# Specifies the path of the ssh key you want to use
|
|
|
ab224c |
# when do ssh dump, the default value is
|
|
|
ab224c |
# /root/.ssh/kdump_id_rsa.
|
|
|
ab224c |
#
|
|
|
ab224c |
# <fs type> <partition> - Will mount -t <fs type> <partition> /mnt and copy
|
|
|
ab224c |
# /proc/vmcore to /mnt/var/crash/%DATE/.
|
|
|
ab224c |
# NOTE: <partition> can be a device node, label or uuid.
|
|
|
ab224c |
# It's recommended to use persistent device names
|
|
|
ab224c |
# such as /dev/vg/<devname>.
|
|
|
ab224c |
# Otherwise it's suggested to use label or uuid.
|
|
|
ab224c |
#
|
|
|
ab224c |
# path <path> - Append path to the filesystem device which you are
|
|
|
ab224c |
# dumping to. Ignored for raw device dumps.
|
|
|
ab224c |
# If unset, will default to /var/crash.
|
|
|
ab224c |
#
|
|
|
ab224c |
# core_collector <command> <options>
|
|
|
ab224c |
# - This allows you to specify the command to copy
|
|
|
ab224c |
# the vmcore. You could use the dump filtering
|
|
|
ab224c |
# program makedumpfile, the default one, to retrieve
|
|
|
ab224c |
# your core, which on some arches can drastically
|
|
|
ab224c |
# reduce core file size. See /sbin/makedumpfile --help
|
|
|
ab224c |
# for a list of options. Note that the -i and -g
|
|
|
ab224c |
# options are not needed here, as the initrd will
|
|
|
ab224c |
# automatically be populated with a config file
|
|
|
ab224c |
# appropriate for the running kernel.
|
|
|
ab224c |
# Default core_collector for raw/ssh dump is:
|
|
|
765b01 |
# "makedumpfile -F -l --message-level 1 -d 31".
|
|
|
ab224c |
# Default core_collector for other targets is:
|
|
|
765b01 |
# "makedumpfile -l --message-level 1 -d 31".
|
|
|
ab224c |
# For core_collector format details please refer to
|
|
|
ab224c |
# kexec-kdump-howto.txt or kdump.conf manpage.
|
|
|
ab224c |
#
|
|
|
ab224c |
# kdump_post <binary | script>
|
|
|
ab224c |
# - This directive allows you to run a specified
|
|
|
ab224c |
# executable just after the memory dump process
|
|
|
ab224c |
# terminates. The exit status from the dump process
|
|
|
ab224c |
# is fed to the kdump_post executable, which can be
|
|
|
ab224c |
# used to trigger different actions for success or
|
|
|
ab224c |
# failure.
|
|
|
ab224c |
#
|
|
|
ab224c |
# kdump_pre <binary | script>
|
|
|
ab224c |
# - works just like the kdump_post directive, but instead
|
|
|
ab224c |
# of running after the dump process, runs immediately
|
|
|
ab224c |
# before. Exit status of this binary is interpreted
|
|
|
ab224c |
# as follows:
|
|
|
ab224c |
# 0 - continue with dump process as usual
|
|
|
ab224c |
# non 0 - reboot the system
|
|
|
ab224c |
#
|
|
|
ab224c |
# extra_bins <binaries | shell scripts>
|
|
|
ab224c |
# - This directive allows you to specify additional
|
|
|
ab224c |
# binaries or shell scripts you'd like to include in
|
|
|
ab224c |
# your kdump initrd. Generally only useful in
|
|
|
ab224c |
# conjunction with a kdump_post binary or script that
|
|
|
ab224c |
# relies on other binaries or scripts.
|
|
|
ab224c |
#
|
|
|
ab224c |
# extra_modules <module(s)>
|
|
|
ab224c |
# - This directive allows you to specify extra kernel
|
|
|
ab224c |
# modules that you want to be loaded in the kdump
|
|
|
ab224c |
# initrd, typically used to set up access to
|
|
|
ab224c |
# non-boot-path dump targets that might otherwise
|
|
|
ab224c |
# not be accessible in the kdump environment. Multiple
|
|
|
ab224c |
# modules can be listed, separated by a space, and any
|
|
|
ab224c |
# dependent modules will automatically be included.
|
|
|
ab224c |
#
|
|
|
ab224c |
# default <reboot | halt | poweroff | shell | dump_to_rootfs>
|
|
|
ab224c |
# - Action to preform in case dumping to intended target
|
|
|
ab224c |
# fails. If no default action is specified, "reboot"
|
|
|
ab224c |
# is assumed default.
|
|
|
ab224c |
# reboot: If the default action is reboot simply reboot
|
|
|
ab224c |
# the system and loose the core that you are
|
|
|
ab224c |
# trying to retrieve.
|
|
|
ab224c |
# halt: If the default action is halt, then simply
|
|
|
ab224c |
# halt the system after attempting to capture
|
|
|
ab224c |
# a vmcore, regardless of success or failure.
|
|
|
ab224c |
# poweroff: The system will be powered down
|
|
|
ab224c |
# shell: If the default action is shell, then drop to
|
|
|
ab224c |
# an shell session inside the initramfs from
|
|
|
ab224c |
# where you can try to record the core manually.
|
|
|
ab224c |
# Exiting this shell reboots the system.
|
|
|
ab224c |
# Note: kdump uses bash as the default shell.
|
|
|
ab224c |
# dump_to_rootfs: If non-root dump target is specified,
|
|
|
ab224c |
# the default action can be set as dump_to_rootfs.
|
|
|
ab224c |
# That means when dump to target fails, dump vmcore
|
|
|
ab224c |
# to rootfs from initramfs context and reboot.
|
|
|
ab224c |
#
|
|
|
ab224c |
# force_rebuild <0 | 1>
|
|
|
ab224c |
# - By default, kdump initrd only will be rebuilt when
|
|
|
ab224c |
# necessary. Specify 1 to force rebuilding kdump
|
|
|
ab224c |
# initrd every time when kdump service starts.
|
|
|
ab224c |
#
|
|
|
ab224c |
#override_resettable <0 | 1>
|
|
|
ab224c |
# - Usually a unresettable block device can't be dump target.
|
|
|
ab224c |
# Specifying 1 means though block target is unresettable, user
|
|
|
ab224c |
# understand this situation and want to try dumping. By default,
|
|
|
ab224c |
# it's set to 0, means not to try a destined failure.
|
|
|
ab224c |
#
|
|
|
ab224c |
# dracut_args <arg(s)>
|
|
|
ab224c |
# - Pass extra dracut options when rebuilding kdump
|
|
|
ab224c |
# initrd.
|
|
|
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
|
|
|
ab224c |
#dracut_args --omit-drivers "cfg80211 snd" --add-drivers "ext2 ext3"
|