Installing and Enabling the Pacemaker and Corosync Service
Install and enable Pacemaker and Corosync on each node in the cluster.
To install and configure Pacemaker and Corosync for an HA cluster, complete the following steps on each cluster node:
-
Install the
pcs
andpacemaker
software packages, and the required resource and fence agents, for example, by running the following command:sudo dnf install pcs pacemaker resource-agents fence-agents-all
-
Configure the firewall so that the service components can communicate across the network. For example, if you're using
firewalld
, run the following commands:sudo firewall-cmd --permanent --add-service=high-availability sudo firewall-cmd --add-service=high-availability
The precding commands typically enable the following ports:-
TCP ports 2224 (used by the
pcs
daemon), 3121 (for Pacemaker Remote nodes), and 21064 (for DLM resources). -
UDP ports 5405 (for Corosync clustering) and 5404 (for Corosync multicast, if configured).
-
-
Set a password for the
hacluster
account so you can use the pcs command to configure and manage the cluster:sudo passwd hacluster
Tip:
Set the same same password on each node to avoid authorization issues when running
pcs
commands on different nodes within the same cluster. - Set the
pcsd
service to run and to start at boot by running the following command:sudo systemctl enable --now pcsd.service
Note:
For running High Availability Clustering in the cloud, see the following documents: