893e0b
Kdump-in-cluster-environment HOWTO
893e0b
893e0b
Introduction
893e0b
893e0b
Kdump is a kexec based crash dumping mechansim for Linux. This docuement 
893e0b
illustrate how to configure kdump in cluster environment to allow the kdump 
893e0b
crash recovery service complete without being preempted by traditional power
893e0b
fencing methods. 
893e0b
893e0b
Overview
893e0b
893e0b
Kexec/Kdump
893e0b
893e0b
Details about Kexec/Kdump are available in Kexec-Kdump-howto file and will not
893e0b
be described here.
893e0b
893e0b
fence_kdump
893e0b
893e0b
fence_kdump is an I/O fencing agent to be used with the kdump crash recovery 
893e0b
service. When the fence_kdump agent is invoked, it will listen for a message 
893e0b
from the failed node that acknowledges that the failed node is executing the 
893e0b
kdump crash kernel. Note that fence_kdump is not a replacement for traditional
893e0b
fencing methods. The fence_kdump agent can only detect that a node has entered
893e0b
the kdump crash recovery service. This allows the kdump crash recovery service
893e0b
complete without being preempted by traditional power fencing methods. 
893e0b
893e0b
fence_kdump_send
893e0b
893e0b
fence_kdump_send is a utility used to send messages that acknowledge that the 
893e0b
node itself has entered the kdump crash recovery service. The fence_kdump_send
893e0b
utility is typically run in the kdump kernel after a cluster node has 
893e0b
encountered a kernel panic. Once the cluster node has entered the kdump crash 
893e0b
recovery service, fence_kdump_send will periodically send messages to all 
893e0b
cluster nodes. When the fence_kdump agent receives a valid message from the 
893e0b
failed nodes, fencing is complete.
893e0b
893e0b
How to configure Pacemaker cluster environment:
893e0b
893e0b
If we want to use kdump in Pacemaker cluster environment, fence-agents-kdump
893e0b
should be installed in every nodes in the cluster. You can achieve this via
893e0b
the following command:
893e0b
893e0b
  # yum install -y fence-agents-kdump
893e0b
893e0b
Next is to add kdump_fence to the cluster. Assuming that the cluster consists 
893e0b
of three nodes, they are node1, node2 and node3, and use Pacemaker to perform
893e0b
resource management and pcs as cli configuration tool. 
893e0b
893e0b
With pcs it is easy to add a stonith resource to the cluster. For example, add
893e0b
a stonith resource named mykdumpfence with fence type of fence_kdump via the 
893e0b
following commands:
893e0b
  
893e0b
   # pcs stonith create mykdumpfence fence_kdump \
893e0b
     pcmk_host_check=static-list pcmk_host_list="node1 node2 node3"
893e0b
   # pcs stonith update mykdumpfence pcmk_monitor_action=metadata --force
893e0b
   # pcs stonith update mykdumpfence pcmk_status_action=metadata --force
893e0b
   # pcs stonith update mykdumpfence pcmk_reboot_action=off --force
893e0b
   
893e0b
Then enable stonith
893e0b
   # pcs property set stonith-enabled=true
893e0b
893e0b
How to configure kdump:
893e0b
893e0b
Actually there are two ways how to configure fence_kdump support:
893e0b
893e0b
1) Pacemaker based clusters
893e0b
     If you have successfully configured fence_kdump in Pacemaker, there is
893e0b
     no need to add some special configuration in kdump. So please refer to
893e0b
     Kexec-Kdump-howto file for more information.
893e0b
893e0b
2) Generic clusters
893e0b
     For other types of clusters there are two configuration options in
893e0b
     kdump.conf which enables fence_kdump support:
893e0b
893e0b
       fence_kdump_nodes <node(s)>
893e0b
            Contains list of cluster node(s) separated by space to send
893e0b
            fence_kdump notification to (this option is mandatory to enable
893e0b
            fence_kdump)
893e0b
893e0b
       fence_kdump_args <arg(s)>
893e0b
            Command line arguments for fence_kdump_send (it can contain
893e0b
            all valid arguments except hosts to send notification to)
893e0b
893e0b
     These options will most probably be configured by your cluster software,
893e0b
     so please refer to your cluster documentation how to enable fence_kdump
893e0b
     support.
893e0b
893e0b
Please be aware that these two ways cannot be combined and 2) has precedence
893e0b
over 1). It means that if fence_kdump is configured using fence_kdump_nodes
893e0b
and fence_kdump_args options in kdump.conf, Pacemaker configuration is not
893e0b
used even if it exists.