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
pcsandpacemakersoftware 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-availabilityThe precding commands typically enable the following ports:-
TCP ports 2224 (used by the
pcsdaemon), 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
haclusteraccount so you can use the pcs command to configure and manage the cluster:sudo passwd haclusterTip:
Set the same same password on each node to avoid authorization issues when running
pcscommands on different nodes within the same cluster. - Set the
pcsdservice 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: