20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
Menu
20 Red Hat Clustering (Pacemaker) Interview
Questions and Answers
Published on: September 30, 2018 by Pradeep Kumar
Deploying services in high availability is one of the most important and complex task for
Linux geeks. Red Hat clustering a.k.a Pacemaker is used to con�gure the services like NFS,
Apache, Squid and SMB etc in high availability, here high availability means services will be
available in active-passive mode.
In this article I will try to cover all important Red Hat Clustering or Pacemaker Interview
questions, these questions will help you to prepare for your interview
Q:1 What is the role of Corosync ?
1 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
Ans: It is one of the important component of pacemaker, used for handling the
communication between cluster nodes, apart from this pacemaker also uses it to check
cluster membership and quorum data.
Q:2 What is the use of Quorum in Red Hat
Clustering?
Ans: A Healthy cluster requires quorum to operate, if any case cluster lose the quorum then
cluster will stop or terminate resources and resources group to maintain the data integrity.
So quorum can be de�ned as voting system which is required to maintain the cluster
integrity. In a cluster each node or member has one vote, depending on the number of nodes
in cluster, cluster will form the quorum when either half or more than half votes are present.
Q:3 What are the different type of fencing
supported by Red Hat cluster?
Ans: Red Hat Cluster support two type of fencing,
a) Power Fencing
b) Storage or Fabric Fencing
Q:4: How to open ports in firewall for Cluster
communication?
Ans: Let’s assume you have two node cluster, then run the following command on each
node to open the �rewall ports related to Red Hat clustering,
~]# firewall-cmd --permanent --add-service=high-availability
~] # firewall-cmd --reload
2 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
Q: 5 What is use of pcs command?
Ans: pcs is command line utility, used to con�gure and manage cluster nodes. In other terms
we can say pcs mange every aspect of Pacemaker cluster.
Q: 6 How to check your Cluster status?
Ans: Cluster status be displayed by using two commands,
~]# pcs cluster status
~]# pcs status
Q:7 How to enable automatic startup of cluster on
all the configured cluster nodes?
Ans: Let’s assume you have three node cluster and want to start the cluster services and
join the cluster automatically after reboot. So to achieve run the below command from any
of the cluster node,
3 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
~]# pcs cluster enable --all
Q:8 How to prohibit a cluster node from hosting the
services?
Ans: There are some situations where admin need to temporarily suspend a cluster node
without affecting the cluster operation, this can be easily achieved by marking that cluster
node as “standby“,
Run the below command from one cluster node,
~]# pcs cluster standby {Cluster_Node_Name}
To Resume the cluster services on this node , run the below command,
~]# pcs cluster unstandby {Cluster_Node_Name}
Q:9 How to check the status of Quorum?
Ans: Current state of Quorum of your cluster can be viewed by the command line utility
“corosync-quorumtool”
4 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
Execute the below command from any of the cluster node.
~]# corosync-quorumtool
Above command output will display the information regarding the quorum like Number of
nodes, Quorate Status, Total Votes, Expected Votes and Quorum etc.
To keep running the running “corosync-quorumtool” use “-m” �ag.
Q:10 What is fencing and how it is configured in
Red Hat Cluster / Pacemaker?
Ans: Fencing is a technique or method to power off or terminate the faulty node from the
cluster. Fencing is very important component of a cluster, Red Hat Cluster will not start
resource and service recovery for non responsive node until that node has been fenced.
In Red Hat Clustering, fencing is con�gured via “pcs stonith“, here stonith stands for “Shoot
The Other Node In The Head”
5 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
~]# pcs stonith create name fencing_agent parameters
Q:11 How to view fencing configuration and how to
fence a cluster node?
Ans: To view all the con�guration of fencing execute the following command from any of
node,
~]# pcs stonith show --full
To fence a manually , use the following command
~]# pcs stonith fence nodeb.example.com
Q:12 What is Storage based fencing device and
how to create storage based fencing device?
Ans: As the name suggests, storage based fence device will cut off the faulty cluster node
from storage access, it will not power off or terminate the cluster node.
Let’s assume shared storage like “/dev/sda” is assigned to all the cluster node, then you
create the storage based fencing device using the below command,
~]# pcs stonith create {Name_Of_Fence_Device} fence_scsi devices=/dev/sda meta p
6 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
Use the following command to fence any cluster node for fence testing,
~]# pcs stonith fence {Cluster_Node_Name}
Q:13 How to display the useful information about
the cluster resource?
Ans: To display the information about any cluster resource use the following command from
any of the cluster node,
~]# pcs resource describe {resource_name}
Example:
~]# pcs resource describe Filesystem
To Display the list of all the resources of a cluster, use the beneath command,
~]# pcs resource list
Q:14 Tell me the syntax to create a resource in Red
Hat cluster?
Ans: Use the below syntax to create a resource in Red Hat Cluster / Pacemaker,
~]# pcs resource create {resource_name} {resource_provider} {resource_parameters
Let’s assume we want to create Filesystem resource,
~]# pcs resource create my_fs Filesystem device=/dev/sdb1 directory=/var/www/htm
7 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
Q:15 How to list and clear the fail count of a cluster
resource?
Ans: Fail count of a cluster resource can be displayed by using the following command,
~]# pcs resource failcount show
To clear or reset the failcount of a cluster resource, use the below pcs command,
~]# pcs resource failcount reset {resource_name} {cluster_node_name}
Q:16 How to move cluster resource from one node
to another ?
Ans: Cluster resources and resource groups can be moved away from the cluster node using
the below command,
~]# pcs resource move {resource_or_resources_group} {cluster_node_name}
When a cluster resource or resources group moved away from a cluster node then a
temporary constraint rule is enabled on the cluster for that node , means that resource /
resources group can’t be run that cluster node, so to remove that constraint use the
8 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
following command,
~]# pcs resource clear {resource_or_resource_group} {cluster_node_name}
Q:17 What is the default log file for pacemaker and
corosync ?
Ans: Default log �le for pacemaker is “/var/log/pacemaker.log” and for corosync is “/var/log
/messages”
Q:18: what are constraints and its type?
Ans: Constraints can be de�ned as restrictions or rules which determine in which orders
cluster resources will started and stopped. Constraints are classi�ed into three types,
• Order Constraints – It decides the orders how resources or resource group will be
started or stopped.
• Location constraints – It decides on which nodes resources or resource group may run
• Colocation constraints- It decides whether two resources or resource group may run
on the same node.
Q:19 How to use LVM (logical Volume) on shared
storage in Red Hat clustering / Pacemaker?
Ans: There are two different ways to use LVM on shared storage in a cluster,
9 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
• HA-LVM (Volume Group and its logical volumes can be accessed only one node at a
time, can be used with traditional �le systems ext4 and xfs)
• Clustered LVM (It is commonly used while working with shared �le system like
GFS2)
Q:20 What are logical steps to configure HA-LVM
in Red Hat Cluster?
Ans: Below are the logical steps to con�gure HA-LVM,
Let’s assume shared storage is provisioned on all the cluster nodes,
a) On any of the cluster node, do pvcreate, vgcreate and lvcreate on shared storage disk
b) Format the logical volume on storage disk
c) on each cluster node, enable HA-LVM tagging in �le “/etc/lvm/lvm.conf”
locking_type = 1
Also de�ne logical volume group that are not shared in the cluster,
Volume_list = [rootvg,logvg]
rootvg & logvg are OS volume group and not shared among the cluster nodes.
d) On each cluster node, rebuild initramfs using the following command,
~]# dracut -H -f /boot/initramfs-$(uname -r).img $(uname -r) ; reboot
e) Once all the cluster nodes are rebooted, verify the cluster status using “pcs status”
command,
f) On any of cluster node , create LVM resource using below command,
10 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
~]# pcs resource create ha_lvm LVM volumegroup=cluster_vg exclusive=true --group
g) Now create FileSystem resource from any of the cluster node,
~]# pcs resource create xfs_fs Filesystem device=”/dev/{volume-grp}/{logical_vol
2 thoughts on “20 Red Hat Clustering (Pacemaker)
Interview Questions and Answers”
Himanshu
December 8, 2018 at 2:00 pm
Thanks, I was looking for Redhat Linux Pacemaker Questions and found these really
great and frequently asked.
Reply
11 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
Ashish K. Laxkar
May 28, 2019 at 12:06 pm
Hello,
Very good questions these are frequently asked
Reply
Leave a Comment
Name *
Email *
Website
Post Comment
12 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
Recent Posts
How to Install KVM on Rocky Linux 9 / AlmaLinux 9
How to Install Kubernetes (K8s) Metrics Server Step by Step
How to Install CRI-O (Container Runtime) on Ubuntu 22.04
How to Install Kubernetes Cluster Using Kubespray
How to Install MiniKube on RHEL 8/Rocky Linux 8/AlmaLinux 8
How to Install PgAdmin4 on RHEL 9 Step by Step
How to Install Go (Golang) on Ubuntu Linux Step-by-Step
How to Install NGINX Web Server on Ubuntu 22.04 LTS
How to Hide Nginx Version in Linux (Simple Guide)
13 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
Elementary OS 7 Installation Guide with Screenshots
14 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
15 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
16 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
17 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
18 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
19 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
20 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
21 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
22 of 23 4/5/23, 03:05
20 Red Hat Clustering (Pacemaker) Interview Question... https://www.linuxtechi.com/redhat-clustering-pacemaker...
Privacy Policy Contact Us About Us Write For LinuxTechi
© 2023 LinuxTechi
23 of 23 4/5/23, 03:05