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