Sun Cluster Data Services Planning and Administration Guide for Solaris OS

ProcedureHow to Add a Logical Hostname Resource to a Resource Group Using the Command-Line Interface

Note –

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.

Note –

Perform this procedure from any cluster node.

Before You Begin

Ensure that you have the following information.

  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.

  2. Add the logical hostname resource to the resource group.

    # clreslogicalhostname create -g resource-group -h hostnamelist, … [-N netiflist] resource
    -g resource-group

    Specifies the name of the resource group in which this resource resides.

    -h hostnamelist, …

    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.

    -N netiflist

    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

    Note –

    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.

  3. Verify that the logical hostname resource has been added.

    # clresource show resource

Example 2–6 Adding a Logical Hostname Resource to a Resource Group

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
Resource_project_name:                           default
Enabled{phats1}:                                 True
Enabled{phats2}:                                 True
Monitored{phats1}:                               True
Monitored{phats2}:                               True

Example 2–7 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:

# 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 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.

See Also

The clreslogicalhostname(1CL) man page.