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