Oracle® Solaris Cluster Data Services Planning and Administration Guide

Exit Print View

Updated: September 2014, E39648–02
 
 

How to Add a Logical Hostname Resource to a Resource Group by 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.

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.

  1. On a cluster member, assume the root 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.

    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 -  Oracle Solaris Cluster does not support the use of the adapter name for netif.
    resource

    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
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}:                        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:

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