Perform this procedure from any cluster node.
Before You Begin
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
Ensure that the /etc/netmasks file has IP-address subnet and netmask entries for all logical hostnames. If necessary, edit the /etc/netmasks file to add any missing entries.
# 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.
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 PNM objects that are on each node. Each element in netiflist must be in the form of netif@node. netif can be given as a PNM object 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.
Specifies an optional resource name of your choice. You cannot use the fully qualified name in the resource name.
# 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{phys-schost-1}: True Enabled{phys-schost-2}: True Monitored{phys-schost-1}: True Monitored{phys-schost-2}: TrueExample 9 Adding Logical Hostname Resources That Identify IPMP Groups
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
Next Steps
After you add logical hostname resources, see How to Bring Resource Groups Online to bring the resources online.
Troubleshooting
Adding a resource causes the Oracle Solaris 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.
See Also
The clreslogicalhostname(1CL) man page.