Sun Cluster 3.0 U1 Data Services Installation and Configuration Guide

Adding or Removing a Node to or From a Resource Group

This section contains the following two procedures.

The procedures are slightly different, depending on whether you are adding or removing the node to or from a failover or scalable resource group.

Failover resource groups contain network resources that both failover and scalable services use. Each IP subnetwork connected to the cluster has its own network resource specified and included in a failover resource group. The network resource is either a logical hostname or a shared-address resource. Each network resource includes a list of NAFO groups that it uses. For failover resource groups, you must update the complete list of NAFO groups for each network resource included in the resource group (the netiflist resource property).

For scalable resource groups, in addition to changing the scalable group to be mastered on the new set of hosts, you must repeat the procedure for failover groups that contain the network resources that the scalable resource uses.

See the scrgadm(1M) man page for additional information.


Note -

Run either of these procedures from any cluster node.


How to Add a Node to a Resource Group

You must supply the following information to complete this procedure.

Also note the following points.

Procedure - How to Add a Node to a Resource Group

  1. Display the current node list and the current list of NAFO groups configured for each resource in the resource group.


    # scrgadm -pvv -g resource-group | grep -i nodelist
    # scrgadm -pvv -g resource-group | grep -i netiflist
    

    Note -

    The output of the command line for nodelist identifies the nodes by node name. The output for netiflist identifies them by node ID.


  2. Update netiflist for the network resources that the node addition affects.

    This step overwrites the previous value of netiflist, and therefore you must include all NAFO groups here. Also, you must input nodes to netiflist by node ID. To find the node ID, use scconf -pv | grep "Node ID".


    # scrgadm -c -j network-resource -x netiflist=netiflist
    
    -c

    Changes a network resource.

    -j network-resource

    Specifies the name of the network resource (logical hostname or shared address) being hosted on the netiflist entries.

    -x netiflist=netiflist

    Specifies a comma-separated list that identifies the NAFO groups on each node. Each element in netiflist must be in the form of NAFO-group-name@nodeid.

  3. Update the node list to include all the nodes that can now master this resource group.

    This step overwrites the previous value of nodelist, and therefore you must include all the nodes that can master the resource group here.


    # scrgadm -c -g resource-group -h nodelist
    
    -c

    Changes a resource group.

    -g resource-group

    Specifies the name of the resource group to which the node is being added.

    -h nodelist

    Specifies a comma-separated list of nodes that can master the resource group.

  4. Verify the updated information.


    # scrgadm -pvv -g resource-group | grep -i nodelist
    # scrgadm -pvv -g resource-group | grep -i netiflist
    

Example - Adding a Node to a Resource Group

This example shows how to add a node (phys-schost-2) to a resource group (resource-group-1), which contains a logical-hostname resource (schost-2).


# scrgadm -pvv -g resource-group-1 | grep -i nodelist
(resource-group-1) Res Group Nodelist:    phys-schost-1 phys-schost-3
# scrgadm -pvv -g resource-group-1 | grep -i netiflist
(resource-group-1:schost-2) Res property name: NetIfList
(resource-group-1:schost-2:NetIfList) Res property class: extension(resource-group-1:schost-2:NetIfList) List of NAFO interfaces on each node(resource-group-1:schost-2:NetIfList) Res property type: stringarray(resource-group-1:schost-2:NetIfList) Res property value: nafo0@1 nafo0@3
 
(Only nodes 1 and 3 have been assigned NAFO groups. You must add a NAFO group 
for node 2.)

# scrgadm -c -j schost-2 -x netiflist=nafo0@1,nafo0@2,nafo0@3
# scrgadm -c -g resource-group-1 -h phys-schost-1,phys-schost-2,phys-schost-3
# scrgadm -pvv -g resource-group-1 | grep -i nodelist
(resource-group-1) Res Group Nodelist:     phys-schost-1 phys-schost-2 
                                           phys-schost-3
# scrgadm -pvv -g resource-group-1 | grep -i netiflist
(resource-group-1:schost-2:NetIfList) Res property value: nafo0@1 nafo0@2                                                           nafo0@3

How to Remove a Node From a Resource Group

To complete this procedure, you must supply the following information.

Also note the following points.

Procedure - How to Remove a Node from a Resource Group

  1. Update the node list to include all the nodes that can now master this resource group.

    This step removes the node and overwrites the previous value of nodelist. Be sure to include all the nodes that can master the resource group here.


    # scrgadm -c -g resource-group -h nodelist
    

    -c

    Changes a resource group.

    -g resource-group

    Specifies the name of the resource group from which the node is being removed.

    -h nodelist

    Specifies a comma-separated list of nodes that can master this resource group.

  2. Display the current list of NAFO groups that are configured for each resource in the resource group.


    # scrgadm -pvv -g resource-group | grep -i netiflist
    


    Note -

    The output of the preceding command lines identifies the nodes by node ID.


  3. Update netiflist for network resources that the removal of the node affects.

    This step overwrites the previous value of netiflist. Be sure to include all NAFO groups here. Also, you must input nodes to netiflist by node ID. Run scconf -pv | grep "Node ID" to find the node ID.


    # scrgadm -c -j network-resource -x netiflist=netiflist
    

    -c

    Changes a network resource.

    -j resource-group

    Specifies the name of the network resource (logical hostname or shared address) that is being hosted on the netiflist entries.

    -x netiflist=netiflist

    Specifies a comma-separated list that identifies the NAFO groups on each node. Each element in netiflist must be in the form of NAFO-group-name@nodeid.

  4. Verify the updated information.


    # scrgadm -pvv -g resource-group | grep -i nodelist
    # scrgadm -pvv -g resource-group | grep -i netiflist
    

Example - Removing a Node From a Resource Group

This example shows how to remove a node (phys-schost-3) from a resource group (resource-group-1), which contains a logical-hostname resource (schost-1).


# scrgadm -pvv -g resource-group-1 | grep -i nodelist
(resource-group-1) Res Group Nodelist:       phys-schost-1 phys-schost-2 
                                             phys-schost-3
# scrgadm -c -g resource-group-1 -h phys-schost-1,phys-schost-2
# scrgadm -pvv -g resource-group-1 | grep -i netiflist
(resource-group-1:schost-1) Res property name: NetIfList(resource-group-1:schost-1:NetIfList) Res property class: extension(resource-group-1:schost-1:NetIfList) List of NAFO interfaces on each node(resource-group-1:schost-1:NetIfList) Res property type: stringarray(resource-group-1:schost-1:NetIfList) Res property value: nafo0@1 nafo0@2 
                                                          nafo0@3

(nafo0@3 is the NAFO group to be removed.)

# scrgadm -c -j schost-1 -x netiflist=nafo0@1,nafo0@2
# scrgadm -pvv -g resource-group-1 | grep -i nodelist
(resource-group-1) Res Group Nodelist:       phys-schost-1 phys-schost-2
# scrgadm -pvv -g resource-group-1 | grep -i netiflist
(resource-group-1:schost-1:NetIfList) Res property value: nafo0@1 nafo0@2