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
On a cluster member, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.
Add the logical hostname resource to the resource group.
# clreslogicalhostname create -g resource-group -h hostnamelist, … [-N netiflist] resource |
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. When a logical hostname resource is added to a resource group that runs in a global-cluster non-voting node, the corresponding IP addresses are configured in that node. These IP addresses are available only to applications that are running in that global-cluster non-voting node.
You must specify the fully qualified name with the -h option if you require a fully qualified hostname.
Specifies an optional, comma-separated list that identifies the IPMP groups that are on each node. Each element in netiflist must be in the form of netif@node. netif can be given as an IPMP 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.
Specifies an optional resource name of your choice. You cannot use the fully qualified name in the resource name.
Verify that the logical hostname resource has been added.
# clresource show resource |
This example shows the addition of logical hostname resource (resource-1) to a resource group (resource-group-1).
# clreslogicalhostname create -g resource-group-1 -h schost-1 resource-1 # clresource show resource-1 === Resources === Resource: resource-1 Type: SUNW.LogicalHostname:2 Type_version: 2 Group: resource-group-1 R_description: Resource_project_name: default Enabled{phats1}: True Enabled{phats2}: True Monitored{phats1}: True Monitored{phats2}: 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 IPMP group sc_ipmp0 on node 1 and node 2
A resource that is named cs24-rs, which identifies the IPMP group sc_ipmp1 on node 1 and node 2
# clreslogicalhostname create -g nfs-fo-rg -h cs23-rs -N sc_ipmp0@1,sc_ipmp0@2 cs23-rs # clreslogicalhostname create -g nfs-fo-rg -h cs24-rs -N sc_ipmp1@1,sc_ipmp1@2 cs24-rs |
After you add logical hostname resources, see How to Bring Online Resource Groups to bring the resources online.
Adding a resource causes the Sun Cluster software to validate the resource. If the validation fails, the clreslogicalhostname 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 clreslogicalhostname command.
The clreslogicalhostname(1CL) man page.