9.2.2. Adding a Node to a Cluster
Adding a node to a cluster consists of updating the cluster configuration, propagating the updated configuration to the node to be added, and starting the cluster software on that node. To add a node to a cluster, perform the following steps:
- At any node in the cluster, edit the
/etc/cluster/cluster.conf
to add aclusternode
section for the node that is to be added. For example, in Example 9.2, “Two-node Cluster Configuration”, if node-03.example.com is supposed to be added, then add aclusternode
section for that node. If adding a node (or nodes) causes the cluster to transition from a two-node cluster to a cluster with three or more nodes, remove the followingcman
attributes from/etc/cluster/cluster.conf
:cman two_node="1"
expected_votes="1"
Refer to Section 9.2.3, “Examples of Three-Node and Two-Node Configurations” for comparison between a three-node and a two-node configuration. - Update the
config_version
attribute by incrementing its value (for example, changing fromconfig_version="2"
toconfig_version="3">
). - Save
/etc/cluster/cluster.conf
. - (Optional) Validate the updated file against the cluster schema (
cluster.rng
) by running theccs_config_validate
command. For example:ccs_config_validate
[root@example-01 ~]# ccs_config_validate Configuration validates
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the
cman_tool version -r
command to propagate the configuration to the rest of the cluster nodes. - Verify that the updated configuration file has been propagated.
- Propagate the updated configuration file to
/etc/cluster/
in each node to be added to the cluster. For example, use thescp
command to send the updated configuration file to each node to be added to the cluster. - If the node count of the cluster has transitioned from two nodes to greater than two nodes, you must restart the cluster software in the existing cluster nodes as follows:
- At each node, stop the cluster software according to Section 9.1.2, “Stopping Cluster Software”. For example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - At each node, start the cluster software according to Section 9.1.1, “Starting Cluster Software”. For example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- At each node to be added to the cluster, start the cluster software according to Section 9.1.1, “Starting Cluster Software”. For example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - At any node, using the
clustat
utility, verify that each added node is running and part of the cluster. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For information about usingclustat
, see Section 9.3, “Managing High-Availability Services”.In addition, you can usecman_tool status
to verify node votes, node count, and quorum count. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - At any node, you can use the
clusvcadm
utility to migrate or relocate a running service to the newly joined node. Also, you can enable any disabled services. For information about usingclusvcadm
, see Section 9.3, “Managing High-Availability Services”
Note
When you add a node to a cluster that uses UDPU transport, you must restart all nodes in the cluster for the change to take effect.