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