author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | ms.custom | |
---|---|---|---|---|---|---|---|
rwestMSFT |
randolphwest |
11/18/2024 |
sql |
linux |
include |
|
-
On all cluster nodes, open the Pacemaker firewall ports. To open these ports with
firewalld
, run the following command:sudo firewall-cmd --permanent --add-service=high-availability sudo firewall-cmd --reload
If the firewall doesn't have a built-in high-availability configuration, open the following ports for Pacemaker.
- TCP: Ports 2224, 3121, 21064
- UDP: Port 5405
-
Install Pacemaker packages on all nodes.
sudo yum install pacemaker pcs fence-agents-all resource-agents
-
Set the password for the default user that is created when installing Pacemaker and Corosync packages. Use the same password on all nodes.
sudo passwd hacluster
-
To allow nodes to rejoin the cluster after the restart, enable and start
pcsd
service and Pacemaker. Run the following command on all nodes.sudo systemctl enable pcsd sudo systemctl start pcsd sudo systemctl enable pacemaker
-
Create the Cluster. To create the cluster, run the following command:
RHEL 7
sudo pcs cluster auth <node1> <node2> <node3> -u hacluster -p <password for hacluster> sudo pcs cluster setup --name <clusterName> <node1> <node2> <node3> sudo pcs cluster start --all sudo pcs cluster enable --all
RHEL 8
For RHEL 8, you need to authenticate the nodes separately. Manually enter in the username and password for
hacluster
when prompted.sudo pcs host auth <node1> <node2> <node3> sudo pcs cluster setup <clusterName> <node1> <node2> <node3> sudo pcs cluster start --all sudo pcs cluster enable --all
[!NOTE]
If you previously configured a cluster on the same nodes, you need to use--force
option when runningpcs cluster setup
. This option is equivalent to runningpcs cluster destroy
. To re-enable Pacemaker, runsudo systemctl enable pacemaker
. -
Install [!INCLUDE ssnoversion-md] resource agent for [!INCLUDE ssnoversion-md]. Run the following commands on all nodes.
sudo yum install mssql-server-ha