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