Author: Madhan Gopalakrishnan | Published on : 11-02-202

Pacemaker is an advanced, scalable, and highly available cluster resource manager for Linux. It ensures that services remain available even if some hardware or software components fail.
š¦ Prerequisites
Before installing and configuring Pacemaker, ensure the following requirements are met:
š§ Required Packages
| Package | Description |
|---|---|
pacemaker | Core clustering package |
corosync | Messaging layer for cluster communication |
pcs | Command-line interface for managing the cluster |
resource-agents | Scripts to manage cluster resources |
fence-agents | Tools to isolate failed nodes |
Installation Command:
sudo yum install -y pacemaker corosync pcs resource-agents fence-agents
š Network Requirements
- Each node must have a static IP.
- Ensure multicast or unicast communication is supported.
- Ports 5404/5405 (for Corosync) should be open.
- Proper hostname resolution (use
/etc/hostsor DNS).
š„ļø Compute Requirements
- Minimum 2 nodes (recommended 3 for quorum-based clusters).
- Minimum 2 vCPUs & 4GB RAM per node.
- Linux OS (RHEL/CentOS 7/8, Ubuntu 20.04+ recommended).
š¾ Storage Requirements
- Shared storage (iSCSI, NFS, SAN) recommended for stateful services.
- Local storage supported with DRBD (Distributed Replicated Block Device).
āļø Step-by-Step Configuration
1ļøā£ Set Up Hostname & Hosts File
Edit /etc/hosts on all nodes:
192.168.1.10 node1
192.168.1.11 node2
Set the hostname:
sudo hostnamectl set-hostname node1 # Repeat for node2
2ļøā£ Enable & Start PCS Service
sudo systemctl enable --now pcsd
sudo systemctl start pcsd
3ļøā£ Set Password for hacluster User
echo "password" | sudo passwd hacluster --stdin
4ļøā£ Authenticate Nodes
pcs cluster auth node1 node2 -u hacluster -p password
5ļøā£ Create & Start Cluster
pcs cluster setup --name mycluster node1 node2
pcs cluster start --all
6ļøā£ Enable Cluster to Start at Boot
pcs cluster enable --all
7ļøā£ Verify Cluster Status
pcs status
š Day 2 Activities for Admins
š Check Cluster Status
pcs status
š ļø Manage Cluster Resources
Add a virtual IP resource:
pcs resource create VirtualIP ocf:heartbeat:IPaddr2 ip=192.168.1.100 cidr_netmask=24 op monitor interval=30s
ā Stop & Start Cluster
Stop cluster:
pcs cluster stop --all
Start cluster:
pcs cluster start --all
š”ļø Failover Testing
Simulate node failure:
pcs cluster standby node1
Re-enable the node:
pcs cluster unstandby node1
š Where Can Pacemaker Be Used?
Pacemaker is widely used in various critical environments where high availability is essential, such as:
- Enterprise IT Systems ā Ensures uptime for business applications and services.
- Database Clustering ā Helps maintain continuous database operations.
- Telecommunications ā Supports critical network infrastructure and telecom services.
- Financial Services ā Maintains high availability for banking and trading systems.
- E-Commerce Platforms ā Ensures website availability and smooth transactions.
- Healthcare Systems ā Keeps critical patient data systems operational.
ā³ Real-Time Usage in IT Field
Pacemaker is actively used in IT for:
- Cloud & Virtualized Environments ā Ensuring high availability in cloud platforms like OpenStack.
- Disaster Recovery ā Automatically switching to standby nodes during failure events.
- Load Balancing ā Distributing workloads across multiple servers to prevent failures.
- Critical Web Services ā Keeping web applications, DNS, and mail servers online.
- Storage Clustering ā Providing redundancy for storage solutions like Ceph and GlusterFS.
šÆ Conclusion
Pacemaker is a powerful tool for managing high availability in Linux. With proper setup, monitoring, and management, it ensures critical services remain online, minimizing downtime and improving system resilience.
š Stay High Available & Happy Clustering!








