Pacemaker Cluster Interview Questions & Answers
Q: – What is Pacemaker?
Pacemaker is a cluster resource manager. It achieves maximum availability for your cluster services (resources) by detecting and recovering from node and resource-level failures by making use of the messaging and membership capabilities provided by your preferred cluster infrastructure (either Corosync or Heartbeat).
Q: – what are key features of pacemaker ?
Pacemaker's key features include:
• Detection and recovery of node and service-level failures
• Storage agnostic, no requirement for shared storage
• Resource agnostic, anything that can be scripted can be clustered
• Supports STONITH for ensuring data integrity
• Supports large and small clusters
• Supports both quorate and resource driven clusters TODO: quorum-driven?
• Supports practically any redundancy configuration
• Automatically replicated configuration that can be updated from any node
• Ability to specify cluster-wide service ordering, colocation and anti-colocation
• Support for advanced services type
• Clones: for services which need to be active on multiple nodes
• Multi-state: for services with multiple modes (eg. master/slave, primary/secondary)
• Unified, scriptable, cluster shel
Q: – What are the types of Pacemaker Clusters ?
Pacemaker supports practically any redundancy configuration8 including Active/Active, Active/Passive, N+1, N+M, N-to-1 and N-to-N
Q: – What are the basic components of Pacemaker ?
Pacemaker is composed of four key components :
CIB ( Cluster Information Base)
CRMd ( Cluster Resource Management daemon)
PEngine ( PE or Policy Engine)
The CIB uses XML to represent both the cluster's configuration and current state of all resources in the cluster. The contents of the CIB are automatically kept in sync across the entire cluster and are used by the PEngine to compute the ideal state of the cluster and how it should be achieved.Pacemaker centralizes all cluster decision making by electing one of the CRMd instances to act as a master. Should the elected CRMd process (or the node it is on) fail… a new one is quickly established.
STONITH is an acronym for Shoot-The-Other-Node-In-The-Head and is usually implemented with a remote power switch. In Pacemaker, STONITH devices are modeled as resources (and configured in the CIB) to enable them to be easily monitored for failure.
Q: – How to check the current state of the cluster in pacemaker ?
crm_mon utility is used to display the current state of an active cluster. It can show the cluster status by node or by resource and can be used in either single-shot or dynamically-updating mode. There are also modes for displaying a list of the operations performed (grouped by node and resource) as well as information about failures.
Q: – How to add and modify the cluster resource configuration in pacemaker ?
Using crm utility we can change the cluster resources as show in the below example
crm configure property stonith-enabled=false; (disabled stonith i.e fencing resource)
Q: – How to check the configuration of the pacemaker cluster ?
crm configure show
crm configure show xml
Q: – How to add virtual ipadress/floating ip resource in the pacemaker cluster ?
crm configure primitive ClusterIP ocf:heartbeat:IPaddr2 params ip=192.168.122.120 cidr_netmask=32 op monitor interval=30s
192.168.122.120 is the floating address, we have given the imaginative name ClusterIP and tell the cluster to check that its running every 30 seconds.The other important piece of information here is ocf:heartbeat:IPaddr2,This tells Pacemaker three things about the resource you want to add. The first field, ocf, is the
standard to which the resource script conforms to and where to find it. The second field is specific to OCF resources and tells the cluster which namespace to find the resource script in, in this case heartbeat. The last field indicates the name of the resource script.
Q: – Which command is used to check the validity of the cluster configuration ?
Q: – How to find all the OCF resource agents provided by Pacemaker and Heartbeat ?
crm ra list ocf pacemaker & crm ra list ocf heartbeat
Q: – What Is STONITH ?
STONITH is an acronym for Shoot-The-Other-Node-In-The-Head and it protects your data from being corrupted by rogue nodes or concurrent access. Just because a node is unresponsive, this doesn’t mean it isn’t accessing your data. The only way to be 100% sure that your data is safe, is to use STONITH so we can be certain that the node is truly offline, before allowing the data to be accessed from another node.
STONITH also has a role to play in the event that a clustered service cannot be stopped. In this case, the cluster uses STONITH to force the whole node offline, thereby making it safe to start the service else where.
Q: – What is corosync ?
The Corosync Cluster Engine is an open source project Licensed under the New BSD License derived from the OpenAIS project.CoroSync contains the infrastructure (such as interprocess communication and network protocols) that used to be part of OpenAIS.
Submitted By:-Deepak Rana Email-ID: – email@example.com