You can add a new node to an existing cluster with the following procedure.
About this task
This procedure adds standard clusters nodes running corosync. For information about integrating non-corosync nodes into a cluster, see Integrating non-corosync nodes into a cluster: the pacemaker_remote service.
Note
It is recommended that you add nodes to existing clusters only during a production maintenance window. This allows you to perform appropriate resource and deployment testing for the new node and its fencing configuration.
In this example, the existing cluster nodes are clusternode-01.example.com, clusternode-02.example.com, and clusternode-03.example.com. The new node is newnode.example.com.
Procedure
-
On the new node to add to the cluster, perform the following tasks:
-
Install the cluster packages. If the cluster uses SBD, the Booth ticket manager, or a quorum device, you must manually install the respective packages (
sbd, booth-site, corosync-qdevice) on the new node as well.
[root@newnode ~]# dnf install -y pcs fence-agents-all
In addition to the cluster packages, you will also need to install and configure all of the services that you are running in the cluster, which you have installed on the existing cluster nodes. For example, if you are running an Apache HTTP server in a Red Hat high availability cluster, you will need to install the server on the node you are adding, as well as the wget tool that checks the status of the server.
-
If you are running the
firewalld daemon, run the following commands to enable the ports that are required by the Red Hat High Availability Add-On.
# firewall-cmd --permanent --add-service=high-availability
# firewall-cmd --add-service=high-availability
-
Set a password for the user ID
hacluster. It is recommended that you use the same password for each node in the cluster.
[root@newnode ~]# passwd hacluster
Changing password for user hacluster.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
-
Run the following commands to start the
pcsd service and to enable pcsd at system start.
# systemctl start pcsd.service
# systemctl enable pcsd.service
-
On a node in the existing cluster, perform the following tasks.
-
Authenticate user
hacluster on the new cluster node.
[root@clusternode-01 ~]# pcs host auth newnode.example.com
Username: hacluster
Password:
newnode.example.com: Authorized
-
Add the new node to the existing cluster. This command also syncs the cluster configuration file
corosync.conf to all nodes in the cluster, including the new node you are adding.
[root@clusternode-01 ~]# pcs cluster node add newnode.example.com
-
On the new node to add to the cluster, perform the following tasks.
-
Start and enable cluster services on the new node.
[root@newnode ~]# pcs cluster start
Starting Cluster...
[root@newnode ~]# pcs cluster enable
-
Ensure that you configure and test a fencing device for the new cluster node.