Although the process of deleting a node from a cluster is relatively straightforward, the consequences of changing the number of nodes in your cluster may have implications regarding the configuration of your cluster. For example, if you were to go from a three-node to a two-node cluster, you would have to realize one of the limitations of a two-node cluster: the necessity to have a cluster lock configured (either a cluster lock disk or a Quorum Server). If such changes are required as a consequence of removing a node from the cluster, we have to review the cookbook at the beginning of this chapter where we would realize that modifying the cluster lock configuration requires the cluster to be halted. As well as removing the node from the cluster configuration, we have to consider whether any packages need modifying; it doesn't make sense to have a node listed as an adoptive node when that node no longer exists in the cluster. Before updating the cluster configuration, we need to update the configuration of any affected packages. With no further ado, let's remove node hpeos003 from our cluster. The following sections detail the process I followed. 27.7.1 Ensure that no packages are running on the node ( cmviewcl ) root@hpeos002[] # cmviewcl -v -n hpeos003 NODE STATUS STATE hpeos003 up running Network_Parameters: INTERFACE STATUS PATH NAME PRIMARY up 0/0/0/0 lan0 STANDBY up 0/2/0/0/4/0 lan1 root@hpeos002[] # If any packages were running, it would be advisable to move the packages to another node. 27.7.2 Remove the node as an adoptive node from any configured packages This is a crucial step and it is one that is often forgotten. If we were to leave this step until later, we would come across errors when we try to remove the node from the binary cluster configuration file. If we look at our clockwatch package, we can see that node hpeos003 is an adoptive node for this package. We need to get rid of this dependency on node hpeos003 before we remove the node from the cluster. Let's remove this node from the clockwatch package. Because there are no packages running on node hpeos003 , this process is relatively straightforward. 27.7.2.1 GET THE MOST UP-TO-DATE ASCII PACKAGE CONFIGURATION FILE ( cmgetconf ) root@hpeos002[clockwatch] # cmgetconf -v -p clockwatch clockwatch.curr root@hpeos002[clockwatch] # 27.7.2.2 UPDATE THE ASCII PACKAGE CONFIGURATION FILE In my case, I simply removed the following line from the clockwatch.curr file: NODE_NAME hpeos003 27.7.2.3 CHECK THE UPDATED ASCII PACKAGE CONFIGURATION FILE root@hpeos002[clockwatch] # cmcheckconf -v -P clockwatch.curr Checking existing configuration ... Done Gathering configuration information ... Done Parsing package file: clockwatch.curr. Package clockwatch already exists. It will be modified. Maximum configured packages parameter is 10. Configuring 1 package(s). 9 package(s) can be added to this cluster. Modifying the package configuration for package clockwatch. Warning: Deleting node hpeos003 from package clockwatch. Verification completed with no errors found. Use the cmapplyconf command to apply the configuration. root@hpeos002[clockwatch] # 27.7.2.4 COMPILE AND DISTRIBUTE THE BINARY PACKAGE CONFIGURATION FILE ( cmapplyconf ) root@hpeos002[clockwatch] # cmapplyconf -v -P clockwatch.curr Checking existing configuration ... Done Gathering configuration information ... Done Parsing package file: clockwatch.curr. Package clockwatch already exists. It will be modified. Maximum configured packages parameter is 10. Configuring 1 package(s). 9 package(s) can be added to this cluster. Modify the package configuration ([y]/n)? y Modifying the package configuration for package clockwatch. Warning: Deleting node hpeos003 from package clockwatch. Completed the cluster update. root@hpeos002[clockwatch] # 27.7.2.5 CHECK THAT THE UPDATES HAVE BEEN APPLIED SUCCESSFULLY ( cmviewcl ) root@hpeos002[clockwatch] # cmviewcl -v -p clockwatch PACKAGE STATUS STATE AUTO_RUN NODE clockwatch up running enabled hpeos001 Policy_Parameters: POLICY_NAME CONFIGURED_VALUE Failover configured_node Failback manual Script_Parameters: ITEM STATUS MAX_RESTARTS RESTARTS NAME Service up 0 0 clock_mon Subnet up 192.168.0.0 Resource up /system/kernel_resource/system_v_ipc /shared_memory/shmmni Node_Switching_Parameters: NODE_TYPE STATUS SWITCHING NAME Primary up enabled hpeos001 (current) Alternate up enabled hpeos002 root@hpeos002[clockwatch] # Now that the node has been removed from the package, we can continue removing it from the cluster. 27.7.2.6 STOP CLUSTER SERVICE ON THE NODE TO BE REMOVED ( cmhaltnode ) root@hpeos002[] # cmhaltnode -v hpeos003 Disabling package switching to all nodes being halted. Disabling all packages from running on hpeos003. Warning: Do not modify or enable packages until the halt operation is completed. Halting cluster services on node hpeos003. .. Successfully halted all nodes specified. Halt operation complete. root@hpeos002[] # cmviewcl -v -n hpeos003 NODE STATUS STATE hpeos003 down halted Network_Parameters: INTERFACE STATUS PATH NAME PRIMARY unknown 0/0/0/0 lan0 STANDBY unknown 0/2/0/0/4/0 lan1 root@hpeos002[] # 27.7.3 Get the most up-to-date version of the ASCII cluster configuration file ( cmgetconf ) root@hpeos002[] # cd /etc/cmcluster root@hpeos002[cmcluster] # cmgetconf -v -c McBond cluster.ascii.curr 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] # 27.7.4 Update the ASCII cluster configuration file to remove the entry for the node to be deleted In my case, I removed the following lines from the file cluster.ascii.curr : NODE_NAME hpeos003 NETWORK_INTERFACE lan0 HEARTBEAT_IP 192.168.0.203 NETWORK_INTERFACE lan1 # List of serial device file names # For example: # SERIAL_DEVICE_FILE /dev/tty0p0 # Primary Network Interfaces on Bridged Net 1: lan0. # Possible standby Network Interfaces on Bridged Net 1: lan1. 27.7.5 Check the updated ASCII cluster configuration file ( cmcheckconf ) root@hpeos002[cmcluster] # cmcheckconf -v -C cluster.ascii.curr Checking cluster file: cluster.ascii.curr 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. Modifying configuration on node hpeos001 Modifying configuration on node hpeos002 Removing configuration from node hpeos003 Modifying the cluster configuration for cluster McBond. Modifying node hpeos001 in cluster McBond. Modifying node hpeos002 in cluster McBond. Deleting node hpeos003 from cluster McBond. Verification completed with no errors found. Use the cmapplyconf command to apply the configuration. root@hpeos002[cmcluster] # 27.7.6 Compile and distribute the binary cluster configuration file ( cmapplyconf ) root@hpeos002[cmcluster] # cmapplyconf -v -C cluster.ascii.curr Checking cluster file: cluster.ascii.curr 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. Modifying configuration on node hpeos001 Modifying configuration on node hpeos002 Removing configuration from node hpeos003 Modify the cluster configuration ([y]/n)? y Modifying the cluster configuration for cluster McBond. Modifying node hpeos001 in cluster McBond. Modifying node hpeos002 in cluster McBond. Deleting node hpeos003 from cluster McBond. Completed the cluster creation. root@hpeos002[cmcluster] # 27.7.7 Check that the updates were applied successfully ( cmviewcl ) 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 root@hpeos002[cmcluster] # As you will no doubt agree, removing a node from the cluster can be a more involved process than it first appears. |