Ce contenu n'est pas disponible dans la langue sélectionnée.
3.2.2. Adding Cluster Nodes
Note
It is highly 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.
Use the following procedure to add a new node to an existing cluster. 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.
On the new node to add to the cluster, perform the following tasks.
- Install the cluster packages. If the cluster uses SBD, you must manually install the
sbdpackage on the new node as well.yum install -y pacemaker cman pcs
[root@newnode ~]# yum install -y pacemaker cman pcsCopy to Clipboard Copied! Toggle word wrap Toggle overflow - To prevent
corosyncfrom starting withoutcman, execute the following command:chkconfig corosync off
[root@newnode ~]# chkconfig corosync offCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Set a password for the user ID
hacluster. It is recommended that you use the same password for each node in the cluster.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Start and enable
pcsdon the new node:service pcsd start chkconfig pcsd on
[root@newnode ~]# service pcsd start [root@newnode ~]# chkconfig pcsd onCopy to Clipboard Copied! Toggle word wrap Toggle overflow
On a node in the existing cluster, perform the following tasks.
- Authenticate user
haclusteron the new cluster node.pcs cluster auth newnode.example.com Username: hacluster Password: newnode.example.com: Authorized
[root@clusternode-01 ~]# pcs cluster auth newnode.example.com Username: hacluster Password: newnode.example.com: AuthorizedCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Add the new node to the existing cluster. This command also syncs the cluster configuration file
cluster.confto all nodes in the cluster, including the new node you are adding.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
On the new node to add to the cluster, perform the following tasks.
- Enable cluster services on the new node. In Red Hat Enterprise Linux 6, the new node is started automatically by PCS.
pcs cluster enable
[root@newnode ~]# pcs cluster enableCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Ensure that you configure and test a fencing device for the new cluster node. For information on configuring fencing devices, see Chapter 4, Fencing: Configuring STONITH.