When you add a logical hostname resource to a resource group, the extension properties of the resource are set to their default values. To specify a nondefault value, you must modify the resource after you add the resource to a resource group. For more information, see How to Modify a Logical Hostname Resource or a Shared Address Resource.
Perform this procedure from any cluster node.
Ensure that you have the following information.
The name of the failover resource group to which you are adding the resource
The hostnames that you plan to add to the resource group
Become superuser on a cluster member.
Add the logical hostname resource to the resource group.
# scrgadm -a -L [-j resource] -g resource-group -l hostnamelist, … [-n netiflist]
Adds a logical hostname resource.
Specifies the logical hostname resource form of the command.
Specifies an optional resource name of your choice. If you do not specify this option, the name defaults to the first hostname that is specified with the -l option.
Specifies the name of the resource group in which this resource resides.
Specifies a comma-separated list of UNIX hostnames (logical hostnames) by which clients communicate with services in the resource group.
Specifies an optional, comma-separated list that identifies the IP Networking Multipathing groups that are on each node. Each element in netiflist must be in the form of netif@node. netif can be given as an IP Networking Multipathing group name, such as sc_ipmp0. The node can be identified by the node name or node ID, such as sc_ipmp0@1 or sc_ipmp@phys-schost-1.
Sun Cluster does not support the use of the adapter name for netif.
Verify that the logical hostname resource has been added.
# scrgadm -pv -j resource
This example shows the addition of logical hostname resource (resource-1) to a resource group (resource-group-1).
# scrgadm -a -L -j resource-1 -g resource-group-1 -l schost-1 # scrgadm -pv -j resource-1 Res Group name: resource-group-1 (resource-group-1) Res name: resource-1 (resource-group-1:resource-1) Res R_description: (resource-group-1:resource-1) Res resource type: SUNW.LogicalHostname (resource-group-1:resource-1) Res resource group name: resource-group-1 (resource-group-1:resource-1) Res enabled: False (resource-group-1:resource-1) Res monitor enabled: True
This example shows the addition of the following logical host name resources to the resource group nfs-fo-rg:
A resource that is named cs23-rs, which identifies the IP Networking Multipathing group sc_ipmp0 on node 1 and node 2
A resource that is named cs24-rs, which identifies the IP Networking Multipathing group sc_ipmp1 on node 1 and node 2
# scrgadm -a -L -j cs23-rs -g nfs-fo-rg -l cs23-rs -n sc_ipmp0@1,sc_ipmp0@2 # scrgadm -a -L -j cs24-rs -g nfs-fo-rg -l cs24-rs -n sc_ipmp1@1,sc_ipmp1@2
After you add logical hostname resources, use the procedure How to Bring Online Resource Groups to bring them online.
Adding a resource causes the Sun Cluster software to validate the resource. If the validation fails, the scrgadm command prints an error message and exits. To determine why the validation failed, check the syslog on each node for an error message. The message appears on the node that performed the validation, not necessarily the node on which you ran the scrgadm command.
The scrgadm(1M) man page.