Skip Navigation Links
Exit Print View
| Oracle Solaris Cluster Data Services Planning and Administration Guide Oracle Solaris Cluster 4.1

Search Scope:

- This Document
- Entire Library

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

- Logical hostname resources

- Shared-address resources

- Data service (application) resources

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

- The `clsetup` utility. See the `clsetup`(1CL) man page for more information.

- Oracle Solaris Cluster maintenance commands.

You can use the `clsetup` utility or the Oracle Solaris Cluster maintenance commands to add the logical hostname resources and shared-address resources to the resource group.

The `clsetup` utility enables 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. 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 Oracle Solaris Cluster Concepts Guide and Chapter 1, Planning for Oracle Solaris Cluster Data Services.

## How 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 Oracle Solaris Cluster maintenance commands. Most commands also have short forms. Except for the forms of the command names, the commands are identical.

Before You Begin

Ensure that the following prerequisites are met:

- An entry for each logical hostname that is to be made available by the resource is added to the name service database.

- If you are using IP Networking Multipathing (IPMP) groups, the groups are configured on the nodes where the logical hostname resource can be brought online.

Ensure that you have the following information:

- The hostnames that you plan to add to the resource group

1. Assume the `root` role on any cluster node.
2. Start the `clsetup` utility.

       # clsetup

   The `clsetup` main menu is displayed.

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

   The Data Services menu is displayed.

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

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

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

   The `clsetup` utility provides 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 and 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 provides 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 lists the names of the Oracle Solaris Cluster objects that the utility will create.

9. If you require a different name for any Oracle Solaris Cluster object, change the name as follows.
   1. Type the number for the name that you are changing and press Return.

      The `clsetup` utility provides 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 Oracle Solaris Cluster objects that the utility will create.

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

    The `clsetup` utility provides information about the Oracle Solaris Cluster configuration that the utility will create.

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

    The `clsetup` utility provides a progress message to indicate that the utility is running commands to create the configuration. When configuration is complete, the `clsetup` utility lists 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

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

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.

## How 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 Oracle Solaris Cluster maintenance commands. Most commands also have short forms. Except for the forms of the command names, the commands are identical.

Before You Begin

Ensure that the following prerequisites are met:

- The shared address that is to be made available by the resource has an entry in a name service database.

- If you are using IP Networking Multipathing (IPMP) groups, the groups are configured on the nodes where the shared address resource can be brought online.

Ensure that you have the following information:

- The hostnames that you plan to add to the resource group.

1. Assume the `root` role on any cluster node.
2. Start the `clsetup` utility.

       # clsetup

   The `clsetup` main menu is displayed.

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

   The Data Services menu is displayed.

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

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

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

   The `clsetup` utility lists 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 and 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 provides 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 lists the names of the Oracle Solaris Cluster objects that the utility will create.

9. If you require a different name for any Oracle Solaris Cluster object, change the name as follows.
   1. Type the number for the name that you are changing and press Return.

      The `clsetup` utility provides 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 Oracle Solaris Cluster objects that the utility will create.

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

    The `clsetup` utility provides information about the Oracle Solaris Cluster configuration that the utility will create.

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

    The `clsetup` utility provides a progress message to indicate that the utility is running commands to create the configuration. When configuration is complete, the `clsetup` utility lists 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

## How 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 non–default 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 resource group into which you are adding the resource. This group must be a failover resource group that you created previously.

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

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

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

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{phys-schost-1}:                          False
      Enabled{phys-schost-2}:                          False
      Monitored{phys-schost-1}:                        True
      Monitored{phys-schost-2}:                        True

Next Steps

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

Troubleshooting

Adding a resource causes the Oracle Solaris 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.

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

- The name of the failover resource group to which you are adding the resource

- The name of the resource type for the resource

- The logical hostname resources that the application resource uses, which are the logical hostnames that you previously included in the same resource group

Note - This procedure also applies to proxy resources.

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

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

   `-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 following man pages: `rt_properties`(5), `cluster`(1CL), `rg_properties`(5), `r_properties`(5), and `property_attributes`(5).

   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 Resource_dependencies=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{phys-schost-1}:                          False
      Enabled{phys-schost-2}:                          False
      Monitored{phys-schost-1}:                        True
      Monitored{phys-schost-2}:                        True

Next Steps

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

Troubleshooting

Adding a resource causes the Oracle Solaris 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.

## How to Add a Scalable Application Resource to a Resource Group

A scalable application resource is an application resource that uses the network load balancing features of Oracle Solaris Cluster software. The scalable application resource is in a multi-mastered resource group and has a dependency on one or more 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.

- The name of the scalable resource group to which you are adding the resource

- The name of the resource type for the resource

- The shared address resources that the scalable service resource uses, which are the shared addresses that you previously included in a failover resource group

Note - This procedure also applies to proxy resources.

1. On a cluster member, assume the `root` role that provides `solaris.cluster.modify` RBAC authorization.
2. Add a scalable application resource to the resource group.

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

   `-S`

     Specifies that the resource group is to be multi-mastered. If the `-p` `Maximum_primaries` and `-p` `Desired_primaries` options are omitted, both properties are set to the number of nodes in the resource group's node list.

   `-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` `Resource_dependencies``=` network-resource[,network-resource...]

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

   `-p` `Scalable``=True`

     Specifies that this resource uses the network load balancing feature of Oracle Solaris Cluster software.

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

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

   `-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 following man pages: `cluster`(1CL), `rt_properties`(5), `rg_properties`(5), `r_properties`(5), and `property_attributes`(5).

   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 -S -g resource-group-1 -t resource-type-1 \
    -p Resource_dependencies=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{phys-schost-1}:                          False
      Enabled{phys-schost-2}:                          False
      Monitored{phys-schost-1}:                        True
      Monitored{phys-schost-2}:                        True

Next Steps

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

Troubleshooting

Adding a resource causes the Oracle Solaris 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.

Copyright © 2000, 2012, Oracle and/or its affiliates. All rights reserved. Legal Notices |