Sun Cluster Data Services Planning and Administration Guide for Solaris OS

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.