![]() |
|||
![]() |
![]() ![]() |
![]() |
![]() ![]() |
![]() |
![]() ![]() |
![]() |
| ||
Responding to Cluster Notifications by Modifying the ClusterYou can use the CMM API to respond to notifications received from the nhcmmd daemon that indicate a change in the cluster. In response to these notifications, it might be necessary to remove or disqualify a node or to trigger a switchover or a failover. This section contains these topics: Removing or Excluding a NodeA node can be removed from the cluster by using the cmm_membership_remove() function. The cmm_membership_remove() function temporarily takes the current node out of the cluster by giving it the CMM_OUT_OF_CLUSTER role and all other peer nodes learn that it is not an active peer node. A node with this role is not actually excluded from the cluster. It is still configured to be in the cluster. For an explanation of this role, see Membership Roles. If you want to exclude a node completely from the cluster, first use the cmm_membership_remove() function to remove the role from the cluster. Then remove the entry for this node from the cluster node table. It is better to remove the node completely from the cluster node table instead of attributing the node with an excluded value (X) in the cluster_nodes_table file. For more information, see the cluster_nodes_table(4) man page. The nhcmmd issues notifications of the node's exclusion. For more information, see Triggering a Failover by Using the cmm_membership_remove() Function. Removing the Master NodeRemoving the master node must be done in two stages so as to avoid triggering a failover. First, the node that is master should be released from the role of master by using the cmm_mastership_release() function. This triggers a switchover. Only then should the node be removed from the cluster. The node is removed from the cluster by calling the cmm_membership_remove() function from the node. This gives the node the CMM_OUT_OF_CLUSTER role, effectively taking the node out of the cluster. For more information about how to trigger a switchover, see Triggering A Switchover. For an explanation of the notifications sent when you trigger a switchover, see Switchover Notifications. If the cmm_membership_remove() function is called directly from the master node, without first triggering a switchover to a qualified vice-master node, then a failover is triggered.
For more information about how to trigger a failover, see Triggering A Failover. For an explanation of the notifications sent when you remove the master role with the cmm_membership_remove() function, see Table 6-15. For an explanation of the notifications sent when you trigger a failover, see Failover Notifications. Removing the Vice-Master NodeWhen the cmm_membership_remove() function is called by a system service on the vice-master node, the function removes the vice-master node from the cluster. If the vice-master is removed from the cluster, the cluster no longer has 2N redundancy. You can remove the vice-master node for maintenance purposes. If you want to perform maintenance on both master-eligible nodes, remove the vice-master and carry out the maintenance. Then trigger a switchover, remove the new vice-master and perform the maintenance tasks on this node. For more information, see the Netra High Availability Suite Foundation Services 2.1 6/03 Cluster Administration Guide. For an explanation of the notifications sent when you remove the vice-master node with the cmm_membership_remove() function, see Table 6-9. Removing a Diskless NodeIf the cmm_membership_remove() function is called by a system service on a diskless node, the function removes the diskless node from the cluster. This action has no effect on the role of other nodes in the cluster. Setting the Qualification of a NodeThe cmm_member_setqualif() function sets the qualification of a node. Qualification level is only relevant for master-eligible nodes. This function can only be called from the master node. The nodeid and the qualification level must be provided as input parameters to this function. The nodeid of the current node can be retrieved by using the cmm_node_getid() function. The following example demonstrates how to use the cmm_member_setqualif() function to disqualify a node with the nodeid 12. Example 7-3 Disqualifying a Node
The following example demonstrates how to use the cmm_node_getid() and cmm_member_setqualif() functions. Example 7-4 Requalifying a Node
| ||
| ||
![]() |