Sun Cluster Data Services Planning and Administration Guide for Solaris OS

Tools for Adding Resources to Resource Groups

A resource is an instantiation of a resource type. You must add resources to a resource group before the RGM can manage the resources. This section describes the following three resource types.

Sun Cluster provides the following tools for adding resources to resource groups:

You can use the wizards in the Sun Cluster Manager, the clsetup utility, or the Sun cluster maintenance commands to add the logical hostname resources and shared-address resources to the resource group.

Sun Cluster Manager and the clsetup utility enable you to add resources to the resource group interactively. Configuring these resources interactively reduces the possibility for configuration errors that might result from command syntax errors or omissions. Sun Cluster Manager and the clsetup utility ensure that all required resources are created and that all required dependencies between resources are set.

Always add logical hostname resources and shared address resources to failover resource groups. Add data service resources for failover data services to failover resource groups. Failover resource groups contain both the logical hostname resources and the application resources for the data service. Scalable resource groups contain only the application resources for scalable services. The shared address resources on which the scalable service depends must reside in a separate failover resource group. You must specify dependencies between the scalable application resources and the shared address resources for the data service to scale across cluster nodes.


Note –

The DEPRECATED flag marks the logical hostname or shared address resource as a deprecated address. These addresses are not suitable for outbound requests since they can migrate to a different cluster node due to a failover or switchover.


For more information about resources, see Sun Cluster Concepts Guide for Solaris OS and Chapter 1, Planning for Sun Cluster Data Services.

ProcedureHow to Add a Logical Hostname Resource to a Resource Group by Using the clsetup Utility

The following instructions explain how to add a logical hostname resource to a resource group by using the clsetup utility. Perform this procedure from one node only.

This procedure provides the long forms of the Sun Cluster maintenance commands. Most commands also have short forms. Except for the forms of the command names, the commands are identical. For a list of the commands and their short forms, see Appendix A, Sun Cluster Object-Oriented Commands.

Before You Begin

Ensure that the following prerequisites are met:

Ensure that you have the following information:

  1. Become superuser on any cluster node.

  2. Start the clsetup utility.


    # clsetup
    

    The clsetup main menu is displayed.

  3. Type the number that corresponds to the option for data services and press Return.

    The Data Services menu is displayed.

  4. Type the number that corresponds to the option for configuring the Logical Hostname resource and press Return.

    The clsetup utility displays the list of prerequisites for performing this task.

  5. Verify that the prerequisites are met, and press Return to continue.

    The clsetup utility displays a list of the cluster nodes where the logical hostname resource can be brought online.

  6. Select the nodes where the logical hostname resource can be brought online.

    • To accept the default selection of all listed nodes in an arbitrary order, type a and press Return.

    • To select a subset of the listed nodes, type a comma-separated or space-separated list of the numbers that correspond to the nodes. Then press Return.

    • To select all nodes in a particular order, type a comma-separated or space-separated ordered list of the numbers that correspond to the nodes and press Return.

      Ensure that the nodes are listed in the order in which the nodes are to appear in the logical hostname resource group's node list. The first node in the list is the primary node of this resource group.

  7. To confirm your selection of nodes, type d and press Return.

    The clsetup utility displays a screen where you can specify the logical hostname that the resource is to make available.

  8. Type the logical hostname that this resource is to make available and press Return.

    The clsetup utility displays the names of the Sun Cluster objects that the utility will create.

  9. If you require a different name for any Sun Cluster object, change the name as follows.

    1. Type the number that corresponds to the name that you are changing and press Return.

      The clsetup utility displays a screen where you can specify the new name.

    2. At the New Value prompt, type the new name and press Return.

    The clsetup utility returns you to the list of the names of the Sun Cluster objects that the utility will create.

  10. To confirm your selection of Sun Cluster object names, type d and press Return.

    The clsetup utility displays information about the Sun Cluster configuration that the utility will create.

  11. To create the configuration, type c and press Return.

    The clsetup utility displays a progress message to indicate that the utility is running commands to create the configuration. When configuration is complete, the clsetup utility displays the commands that the utility ran to create the configuration.

  12. (Optional) Type q and press Return repeatedly until you quit the clsetup utility.

    If you prefer, you can leave the clsetup utility running while you perform other required tasks before using the utility again. If you choose to quit clsetup, the utility recognizes your existing logical hostname resource group when you restart the utility.

  13. Verify that the logical hostname resource has been created.

    Use the clresource(1CL) utility for this purpose. By default, the clsetup utility assigns the name node_name-rg to the resource group.


    # clresource show node_name-rg
    

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.


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

Troubleshooting

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.

ProcedureHow to Add a Shared Address Resource to a Resource Group by Using the clsetup Utility

The following instructions explain how to add a shared address resource to a resource group by using the clsetup utility. Perform this procedure from any cluster node.

This procedure provides the long forms of the Sun Cluster maintenance commands. Most commands also have short forms. Except for the forms of the command names, the commands are identical. For a list of the commands and their short forms, see Appendix A, Sun Cluster Object-Oriented Commands.

Before You Begin

Ensure that the following prerequisites are met:

Ensure that you have the following information:

  1. Become superuser on any cluster node.

  2. Start the clsetup utility.


    # clsetup
    

    The clsetup main menu is displayed.

  3. Type the number that corresponds to the option for data services and press Return.

    The Data Services menu is displayed.

  4. Type the number that corresponds to the option for configuring the shared address resource and press Return.

    The clsetup utility displays the list of prerequisites for performing this task.

  5. Verify that the prerequisites are met, and press Return to continue.

    The clsetup utility displays a list of the cluster nodes where the shared address resource can be brought online.

  6. Select the nodes where the shared address resource can be brought online.

    • To accept the default selection of all listed nodes in an arbitrary order, type a and press Return.

    • To select a subset of the listed nodes, type a comma-separated or space-separated list of the numbers that correspond to the nodes. Then press Return.

    • To select all nodes in a particular order, type a comma-separated or space-separated ordered list of the numbers that correspond to the nodes and press Return.

  7. To confirm your selection of nodes, type d and press Return.

    The clsetup utility displays a screen where you can specify the shared address that the resource is to make available.

  8. Type the shared address that this resource is to make available and press Return.

    The clsetup utility displays the names of the Sun Cluster objects that the utility will create.

  9. If you require a different name for any Sun Cluster object, change the name as follows.

    1. Type the number that corresponds to the name that you are changing and press Return.

      The clsetup utility displays a screen where you can specify the new name.

    2. At the New Value prompt, type the new name and press Return.

    The clsetup utility returns you to the list of the names of the Sun Cluster objects that the utility will create.

  10. To confirm your selection of Sun Cluster object names, type d and press Return.

    The clsetup utility displays information about the Sun Cluster configuration that the utility will create.

  11. To create the configuration, type c and Press Return.

    The clsetup utility displays a progress message to indicate that the utility is running commands to create the configuration. When configuration is complete, the clsetup utility displays the commands that the utility ran to create the configuration.

  12. (Optional) Type q and press Return repeatedly until you quit the clsetup utility.

    If you prefer, you can leave the clsetup utility running while you perform other required tasks before using the utility again. If you choose to quit clsetup, the utility recognizes your existing shared address resource group when you restart the utility.

  13. Verify that the shared address resource has been created.

    Use the clresource(1CL) utility for this purpose. By default, the clsetup utility assigns the name node_name-rg to the resource group.


    # clresource show node_name-rg
    

ProcedureHow to Add a Shared Address Resource to a Resource Group Using the Command-Line Interface


Note –

When you add a shared address 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 shared address resource to the resource group.


    # clressharedaddress create -g resource-group -h hostnamelist, … \
    [-X auxnodelist] [-N netiflist] resource
    
    -g resource-group

    Specifies the resource group name. In the node list of a shared address resource, do not specify more than one global-cluster non-voting node on the same global-cluster voting node. Specify the same list of nodename:zonename pairs as the node list of the scalable resource group.

    -h hostnamelist, …

    Specifies a comma-separated list of shared address hostnames.

    -X auxnodelist

    Specifies a comma-separated list of node names or IDs that identify the cluster nodes that can host the shared address but never serve as primary if failover occurs. These nodes are mutually exclusive, with the nodes identified as potential masters in the resource group's node list. If no auxiliary node list is explicitly specified, the list defaults to the list of all cluster node names that are not included in the node list of the resource group that contains the shared address resource.


    Note –

    To ensure that a scalable service runs in all global-cluster non-voting nodes that were created to master the service, the complete list of nodes must be included in the node list of the shared address resource group or the auxnodelist of the shared address resource. If all the nodes are listed in the node list, the auxnodelist can be omitted.


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


    resource

    Specifies an optional resource name of your choice.

  3. Verify that the shared address resource has been added and validated.


    # clresource show resource
    

Example 2–8 Adding a Shared Address Resource to a Resource Group

This example shows the addition of a shared address resource (resource-1) to a resource group (resource-group-1).


# clressharedaddress create -g resource-group-1 -h schost-1 resource-1
# clresource show resource-1

=== Resources ===                              

  Resource:                                        resource-1
  Type:                                            SUNW.SharedAddress:2
  Type_version:                                    2
  Group:                                           resource-group-1
  R_description:                                   
  Resource_project_name:                           default
  Enabled{phats1}:                                 False
  Enabled{phats2}:                                 False
  Monitored{phats1}:                               True
  Monitored{phats2}:                               True

Next Steps

After you add a shared address resource, use the procedure How to Bring Online Resource Groups to enable the resource.

Troubleshooting

Adding a resource causes the Sun Cluster software to validate the resource. If the validation fails, the clressharedaddress 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 clressharedaddress command.

See Also

The clressharedaddress(1CL) man page.

ProcedureHow to Add a Failover Application Resource to a Resource Group

A failover application resource is an application resource that uses logical hostnames that you previously created in a failover resource group.


Note –

Perform this procedure from any cluster node.


Before You Begin

Ensure that you have the following information.


Note –

This procedure also applies to proxy resources.


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

  2. Add a failover application resource to the resource group.


    # clresource create -g resource-group -t resource-type \
    [-p "extension-property[{node-specifier}]"=value, …] [-p standard-property=value, …] resource
    
    -g resource-group

    Specifies the name of a failover resource group. This resource group must already exist.

    -t resource-type

    Specifies the name of the resource type for the resource.

    -p "extension-property[{node-specifier}]"=value, …

    Specifies a comma-separated list of extension properties that you are setting for the resource. The extension properties that you can set depend on the resource type. To determine which extension properties to set, see the documentation for the resource type.

    node-specifier is an optional qualifier to the -p and -x options. This qualifier indicates that the extension property or properties on only the specified node or nodes are to be set when the resource is created. The specified extension properties on other nodes in the cluster are not set. If you do not include node-specifier, the specified extension properties on all nodes in the cluster are set. You can specify a node name or a node identifier for node-specifier. Examples of the syntax of node-specifier include the following:


    -p "myprop{phys-schost-1}"
    

    The braces ({}) indicate that you are setting the specified extension property on only node phys-schost-1. For most shells, the double quotation marks (“) are required.

    You can also use the following syntax to set an extension property in two different global-cluster voting nodes on two different nodes:


    -x "myprop{phys-schost-1:zoneA,phys-schost-2:zoneB}"
    

    Note –

    The extension property that you specify with node-specifier must be declared in the RTR file as a per-node property. See Appendix B, Standard Properties for information about the Per_node resource property attribute.


    -p standard-property=value, …

    Specifies a comma-separated list of standard properties that you are setting for the resource. The standard properties that you can set depend on the resource type. To determine which standard properties to set, see the documentation for the resource type and Appendix B, Standard Properties.

    resource

    Specifies your choice of the name of the resource to add.

    The resource is created in the enabled state.

  3. Verify that the failover application resource has been added and validated.


    # clresource show resource
    

Example 2–9 Adding a Failover Application Resource to a Resource Group

This example shows the addition of a resource (resource-1) to a resource group (resource-group-1). The resource depends on logical hostname resources (schost-1, schost-2), which must reside in the same failover resource groups that you defined previously.


# clresource create -g resource-group-1 -t resource-type-1 \
-p Network_resources_used=schost-1,schost2  resource-1\
# clresource show resource-1

=== Resources ===

  Resource:                                        resource-1
  Type:                                            resource-type-1
  Type_version:                                    
  Group:                                           resource-group-1
  R_description:                                   
  Resource_project_name:                           default
  Enabled{phats1}:                                 False
  Enabled{phats2}:                                 False
  Monitored{phats1}:                               True
  Monitored{phats2}:                               True

Next Steps

After you add a failover application resource, use the procedure How to Bring Online Resource Groups to enable the resource.

Troubleshooting

Adding a resource causes the Sun Cluster software to validate the resource. If the validation fails, the clresource 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 clresource command.

See Also

The clresource(1CL) man page.

ProcedureHow to Add a Scalable Application Resource to a Resource Group

A scalable application resource is an application resource that uses shared-address resources. The shared-address resources are in a failover resource group.


Note –

Perform this procedure from any cluster node.


Before You Begin

Ensure that you have the following information.


Note –

This procedure also applies to proxy resources.


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

  2. Add a scalable application resource to the resource group.


    # clresource create -g resource-group -t resource-type \
    -p Network_resources_used=network-resource[,network-resource...] \
    -p Scalable=True
    [-p "extension-property[{node-specifier}]"=value, …] [-p standard-property=value, …] resource
    
    -g resource-group

    Specifies the name of a scalable service resource group that you previously created.

    -t resource-type

    Specifies the name of the resource type for this resource.

    -p Network_resources_used= network-resource[,network-resource...]

    Specifies the list of network resources (shared addresses) on which this resource depends.

    -p Scalable=True

    Specifies that this resource is scalable.

    -p "extension-property[{node-specifier}]"=value, …

    Specifies a comma-separated list of extension properties that you are setting for the resource. The extension properties that you can set depend on the resource type. To determine which extension properties to set, see the documentation for the resource type.

    node-specifier is an optional qualifier to the -p and -x options. This qualifier indicates that the extension property or properties on only the specified node or nodes are to be set when the resource is created. The specified extension properties on other nodes in the cluster are not set. If you do not include node-specifier, the specified extension properties on all nodes in the cluster are set. You can specify a node name or a node identifier for node-specifier. Examples of the syntax of node-specifier include the following:


    -p "myprop{phys-schost-1}"
    

    The braces ({}) indicate that you are setting the specified extension property on only node phys-schost-1. For most shells, the double quotation marks (“) are required.

    You can also use the following syntax to set an extension property in two different global-cluster voting nodes on two different nodes:


    -x "myprop{phys-schost-1:zoneA,phys-schost-2:zoneB}"
    

    Note –

    The extension property that you specify with node-specifier must be declared in the RTR file as a per-node property. See Appendix B, Standard Properties for information about the Per_node resource property attribute.


    -p standard-property=value, …

    Specifies a comma-separated list of standard properties that you are setting for the resource. The standard properties that you can set depend on the resource type. For scalable services, you typically set the Port_list, Load_balancing_weights, and Load_balancing_policy properties. To determine which standard properties to set, see the documentation for the resource type and Appendix B, Standard Properties.

    resource

    Specifies your choice of the name of the resource to add.

    The resource is created in the enabled state.

  3. Verify that the scalable application resource has been added and validated.


    # clresource show resource
    

Example 2–10 Adding a Scalable Application Resource to a Resource Group

This example shows the addition of a resource (resource-1) to a resource group (resource-group-1). Note that resource-group-1 depends on the failover resource group that contains the network addresses that are in use (schost-1 and schost-2 in the following example). The resource depends on shared address resources (schost-1, schost-2), which must reside in one or more failover resource groups that you defined previously.


# clresource create -g resource-group-1 -t resource-type-1 \
-p Network_resources_used=schost-1,schost-2 resource-1 \
-p Scalable=True
# clresource show resource-1

=== Resources ===                              

  Resource:                                        resource-1
  Type:                                            resource-type-1
  Type_version:                                    
  Group:                                           resource-group-1
  R_description:                                   
  Resource_project_name:                           default
  Enabled{phats1}:                                 False
  Enabled{phats2}:                                 False
  Monitored{phats1}:                               True
  Monitored{phats2}:                               True

Next Steps

After you add a scalable application resource, follow the procedure How to Bring Online Resource Groups to enable the resource.

Troubleshooting

Adding a resource causes the Sun Cluster software to validate the resource. If the validation fails, the clresource 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 clresource command.

See Also

The clresource(1CL) man page.