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