Home

About Us

Advertisement

Contact Us

PRIVACY POLICY

  • Facebook
  • X
  • Instagram
  • Pinterest
  • WhatsApp
  • RSS Feed
  • TikTok
ALT

Maalavs Blog

Your Trusted Voice Across the World.

  • NEWS
  • Linux Tech Blogs
  • Windows Tech Blogs
  • VIRTUALIZATION Blogs
Search

šŸ–„ļø High Availability with Pacemaker on Linux šŸš€

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

PackageDescription
pacemakerCore clustering package
corosyncMessaging layer for cluster communication
pcsCommand-line interface for managing the cluster
resource-agentsScripts to manage cluster resources
fence-agentsTools 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/hosts or 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!

Featured Articles

  • Insights into Royal Family Dynamics

    Insights into Royal Family Dynamics

    February 26, 2025
  • Over 50 Deaths Linked to ‘Unknown Disease’ in Congo

    Over 50 Deaths Linked to ‘Unknown Disease’ in Congo

    February 26, 2025
  • North Korea Accused of Major Cyber Heist

    North Korea Accused of Major Cyber Heist

    February 26, 2025
  • Manchester United Announces Job Cuts Amid Financial Restructuring

    Manchester United Announces Job Cuts Amid Financial Restructuring

    February 26, 2025
  • Shannon Sharpe Criticizes Zion Williamson’s Fitness: A Deep Dive into the Controversy

    Shannon Sharpe Criticizes Zion Williamson’s Fitness: A Deep Dive into the Controversy

    February 26, 2025

Search

Author Details

Madhan Gopalakrishnan

I am a passionate “tech blogger” with a knack for breaking down complex topics into simple insights or exploring the latest trends in AI With 5 years of experience in IT Infra implementation and maintenance, I love to share knowledge through in-depth articles and practical tips. When not writing, you can find my hobby “traveling to offbeat destinations”.

  • X
  • Instagram
  • TikTok
  • Facebook

Follow Us on

  • Facebook
  • X
  • Instagram
  • VK
  • Pinterest
  • Last.fm
  • TikTok
  • Telegram
  • WhatsApp
  • RSS Feed

Categories

  • Article (15)
  • NEWS (73)

Archives

  • February 2025 (88)

Tags

About Us

Maalavs Magazine

It is your hub for the latest news across all domains, from technology and business to travel and innovation. We bring insightful updates, expert opinions, and engaging content to keep you informed and ahead. Whether you’re a tech enthusiast, a business professional, or a curious reader, we’ve got something for you. Stay updated with Maalavs Magazine!

Latest Articles

  • Insights into Royal Family Dynamics

    Insights into Royal Family Dynamics

    February 26, 2025
  • Over 50 Deaths Linked to ‘Unknown Disease’ in Congo

    Over 50 Deaths Linked to ‘Unknown Disease’ in Congo

    February 26, 2025
  • North Korea Accused of Major Cyber Heist

    North Korea Accused of Major Cyber Heist

    February 26, 2025

Categories

  • Article (15)
  • NEWS (73)
  • Instagram
  • Facebook
  • LinkedIn
  • X
  • VK
  • TikTok

Proudly Powered by Maalavs | Maalavs Magazine

Scroll to Top