27.2 Adding a Node to the Cluster

     

According to the list above, I can perform this task while the cluster and other packages are running. The process of adding a node is not too difficult. In essence, we need to update the binary cluster configuration file with the node specific details for the new node. Let's get some elementary tasks out of the way first:

  • Set up NTP between the new node and other cluster members .

  • Ensure that any shared LVM volume groups are not activated at boot time.

  • Install Serviceguard and any related patches on the new node.

  • Set up on all nodes the file /etc/cmcluster/cmclnodelist to include the new node name .

The initial steps were covered in Chapter 25, "Setting up a Serviceguard Cluster." To add a new node to our cluster, we need all nodes to be up and running. If we think about this process we could perform it in a number of ways; if we have the most up-to-date cluster ASCII configuration file we could simply append the relevant information to it in order to add new nodes. We would have to be certain of the information we added to that file and we would have to be certain we had the most up-to-date version of the ASCII configuration file. A safer way would be to go back to cmquerycl . We can perform a cmquerycl and produce a new ASCII cluster configuration file. With that we can compare it with our current ASCII configuration file and make any modifications necessary. In fact, to be super-safe we could actually extract from the cluster binary configuration file the ASCII configuration file that relates to it. In this way we are not relying on what might be an old ASCII configuration file. This also has the advantage of being able to perform this step from any node in the cluster. Here goes.

 

 root@hpeos002[cmcluster] #  cmgetconf -v -c McBond Current_cluster.ascii  Gathering configuration information .... Done Warning: The disk at /dev/dsk/c1t2d0 on node hpeos001 does not have an ID, or a disk label. Warning: Disks which do not have IDs cannot be included in the topology description. Use pvcreate(1M) to initialize a disk for LVM or, use vxdiskadm(1M) to initialize a disk for VxVM. root@hpeos002[cmcluster] # 

The warning above relates to a CD-ROM drive, no problem. We can now use cmquerycl to gather information relating to our current nodes and our new node ( hpeos003 ).

 

 root@hpeos002[cmcluster] #  cmquerycl -v -c McBond -n hpeos001 -n hpeos002 -n hpeos003 -C graphics/ccc.gif New.cluster.ascii  Begin checking the nodes... Looking for nodes in cluster McBond ... Done Gathering configuration information ............ Done Warning: The disk at /dev/dsk/c1t2d0 on node hpeos001 does not have an ID, or a disk label. Warning: Disks which do not have IDs cannot be included in the topology description. Use pvcreate(1M) to initialize a disk for LVM or, use vxdiskadm(1M) to initialize a disk for VxVM. Warning: Network interface lan2 on node hpeos003 couldn't talk to itself. Warning: Network interface lan3 on node hpeos003 couldn't talk to itself. Warning: Network interface lan4 on node hpeos003 couldn't talk to itself. Node Names:    hpeos001                hpeos002                hpeos003 

I have abbreviated the output for succinctness. If there are any errors, we need to resolve them before proceeding.

 

 Writing cluster data to New.cluster.ascii. root@hpeos002[cmcluster] # 

We can now compare and contrast the file created from the cmgetconf process against the file created by cmquerycl . I have reviewed the content of the file New.cluster.ascii and it looks complete to me. It has included any modifications I made to the file Current_cluster.ascii file, e.g., MAX_CONFIGURED_PACKAGES 10 and any timing parameters. If I do not want to make any further changes I can simply proceed with the New.cluster.ascii file, as it stands. Be careful not to make any changes that require the cluster to be down; check the Cookbook above. Here are the lines that cmquerycl has effectively added to the configuration file for node hpeos003 :

 

 NODE_NAME               hpeos003   NETWORK_INTERFACE     lan0     HEARTBEAT_IP                192.168.0.203   NETWORK_INTERFACE     lan1   FIRST_CLUSTER_LOCK_PV        /dev/dsk/c4t8d0 # List of serial device file names # For example: # SERIAL_DEVICE_FILE    /dev/tty0p0 # Possible standby Network Interfaces for lan0: lan1. 

I will proceed with adding this new node into the cluster.

 

 root@hpeos002[cmcluster] #  cmcheckconf -v -C New.cluster.ascii  Checking cluster file: New.cluster.ascii Checking nodes ... Done Checking existing configuration ... Done Gathering configuration information ... Done Gathering configuration information ... Done Gathering configuration information .............. Done Cluster McBond is an existing cluster Checking for inconsistencies .. Done Cluster McBond is an existing cluster Maximum configured packages parameter is 10. Configuring 1 package(s). 9 package(s) can be added to this cluster. Adding configuration to node hpeos003 Modifying configuration on node hpeos001 Modifying configuration on node hpeos002 Modifying the cluster configuration for cluster McBond. Adding node hpeos003 to cluster McBond. Verification completed with no errors found. Use the cmapplyconf command to apply the configuration. root@hpeos002[cmcluster] # root@hpeos002[cmcluster] #  cmapplyconf -v -C New.cluster.ascii  Checking cluster file: New.cluster.ascii Checking nodes ... Done Checking existing configuration ... Done Gathering configuration information ... Done Gathering configuration information ... Done Gathering configuration information .............. Done Cluster McBond is an existing cluster Checking for inconsistencies .. Done Cluster McBond is an existing cluster Maximum configured packages parameter is 10. Configuring 1 package(s). 9 package(s) can be added to this cluster. Adding configuration to node hpeos003 Modifying configuration on node hpeos001 Modifying configuration on node hpeos002 Modify the cluster configuration ([y]/n)?  y  Modifying the cluster configuration for cluster McBond. Adding node hpeos003 to cluster McBond. Completed the cluster creation. root@hpeos002[cmcluster] # root@hpeos002[cmcluster] #  cmrunnode -v hpeos003  Successfully started $SGLBIN/cmcld on hpeos003. cmrunnode  : Waiting for cluster to form..... cmrunnode  : Cluster successfully formed. cmrunnode  : Check the syslog files on all nodes in the cluster cmrunnode  : to verify that no warnings occurred during startup. root@hpeos002[cmcluster] #  cmviewcl  CLUSTER      STATUS McBond       up   NODE         STATUS       STATE   hpeos001     up           running     PACKAGE      STATUS       STATE        AUTO_RUN     NODE     clockwatch   up           running      enabled      hpeos001   NODE         STATUS       STATE   hpeos002     up           running   hpeos003     up           running root@hpeos002[cmcluster] # 

I would carefully review syslog.log to ensure all is working as expected. To summarize the task of adding a node to a cluster, here's a template for adding/modifying a node in a cluster:

  • Install Serviceguard on the new node.

  • Install any related patches on the new node.

  • Set up on all nodes, the file /etc/cmcluster/cmclnodelist to include the new node name.

  • Get the most up-to-date ASCII configuration file ( cmgetconf ).

  • Query all nodes, including the new node, in the cluster ( cmquerycl ).

  • Compare the ASCII files obtained from cmgetconf and cmquerycl .

  • Update the ASCII configuration file obtained from cmquerycl .

  • Check the new ASCII configuration file ( cmcheckconf ).

  • Compile and distribute the new binary cluster configuration file ( cmapplyconf ).

  • Start cluster services on the new node ( cmrunnode ).

  • Check for any problems with cmviewcl and the logfile /var/adm/syslog/syslog.log .

Essentially, these are the same steps to modify cluster configuration parameters as well. The only step we need to leave out is the cmquerycl . Make sure that you check with the cookbook to see if the changes you are making require the cluster to be UP or DOWN.

My next task is not to remove a node from the cluster. In my mind, the reason I added node hpeos003 was to perform some useful function. In this case, it is to be a second adoptive node for the clockwatch application. According to the c ookbook, I can add a node to a package while the package is running. That's my next task.



HP-UX CSE(c) Official Study Guide and Desk Reference
HP-UX CSE(c) Official Study Guide and Desk Reference
ISBN: N/A
EAN: N/A
Year: 2006
Pages: 434

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net