Go to main content

Oracle® Solaris Cluster 4.3 Data Services Planning and Administration Guide

Exit Print View

Updated: April 2016
 
 

How to Change Resource Dependency Properties

This procedure explains how to set a resource dependency property. The RGM supports dependencies of one resource upon another. You can specify per-node resource dependencies, which might differ for each per-node instance of a resource. Per-node instances are instances of the resource that are online simultaneously (in a multi-mastered resource group) or disjointly in time (in a failover resource group) on different nodes. For a description of resource properties, see the r_properties(5) man page.

You can use the clsetup utility or the CLI to set a resource dependency. The following procedure shows the steps for the clsetup utility.

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

    The clsetup main menu is displayed.


    Note -  If you want to use the CLI to set a per-node dependency on a subset of cluster nodes, specify each per-node dependency in the following form: resourcename@nodename.
  3. Type the option number for resource groups.

    The Resource Group menu is displayed.

  4. Type the option number for changing the properties of a resource.

    The Change Properties of a Resource screen provides a description of this task.

  5. Type yes.

    A menu of options for this task is displayed.

  6. Type the option number for changing standard resource properties.

    A menu of options for this task is displayed.

  7. Type the option number for the resource whose properties you want to change.

    Only those standard properties that can be changed while the resource is in this state are shown. You might have to disable the resource in order to change certain properties. Check the r_properties(5) man page for more information on setting standard resource properties.

    You can choose to change the resource_dependencies, resource_dependencies_weak, resource_dependencies_restart, or resource_dependencies_offline_restart properties.

  8. Press Return when the resource state is displayed.
  9. Type the option number for the dependency property you want to change.

    The current property name, type, description, and value are displayed.

  10. Type the new values for the dependency list.

    Specify each resource on which this resource is to depend using the following format: resource-name, resource-name{qualifier}, or resource-name@node. See the text on the screen for more information.

    For example, you can change the value of the resource_dependencies property from rs1 to rs1@mynode1,rs2@mynode2,rs3.

  11. Type yes.
  12. Verify that the dependency was set by pressing Return after the Command completed successfully message appears.

    The new value you typed appears in the Current Setting column for the property.

Example 25  Changing Resource Dependency Properties

The following example shows how to use the clresource command to set a per-node resource dependency that is dependent on two different logical hostname resources. The example uses a scalable resource called gds-rs and sets the dependency of gds-rs on trancos-3-rs on ptrancos1 and trancos-4-rs on ptrancos2.

ptrancos1# clresource set -p resource_dependencies=trancos-3-rs@ptrancos1, \
trancos-4-rs@ptrancos2 gds-rs
ptrancos1# clresource show -p resource_dependencies gds-rs

=== Resources ===

Resource:                                       gds-rs
Resource_dependencies: trancos-3-rs@ptrancos1 trancos-4-rs@ptrancos2

--- Standard and extension properties ---
Example 26  Viewing Resource Dependency Properties

The following example shows how to use the scha_resource_get command to retrieve a per-node resource dependency that is dependent on two different logical hostname resources. To set a per-node resource dependency, you must use the clresource set command. The example uses a scalable resource called gds-rs and sets the dependency of gds-rs on trancos-3-rs on ptrancos1 and trancos-4-rs on ptrancos2.

From the ptrancos1 node:

ptrancos1(/root)$ scha_resource_get -O RESOURCE_DEPENDENCIES -R gds-rs
trancos-3-rs
ptrancos1(/root)$ scha_resource_get -O RESOURCE_DEPENDENCIES_NODE -R gds-rs ptrancos1
trancos-3-rs
ptrancos1(/root)$ scha_resource_get -O RESOURCE_DEPENDENCIES_NODE -R gds-rs ptrancos2
trancos-4-rs
ptrancos1(/root)$ scha_resource_get -Q -O RESOURCE_DEPENDENCIES -R gds-rs
trancos-3-rs@ptrancos1 
trancos-4-rs@ptrancos2
ptrancos1(/root)$ scha_resource_get -O NETWORK_RESOURCES_USED -R gds-rs
trancos-3-rs

From the ptrancos2 node:

ptrancos2(/root)$ scha_resource_get -O RESOURCE_DEPENDENCIES -R gds-rs
trancos-4-rs
ptrancos2(/root)$ scha_resource_get -O RESOURCE_DEPENDENCIES_NODE -R gds-rs ptrancos1
trancos-3-rs
ptrancos2(/root)$ scha_resource_get -O RESOURCE_DEPENDENCIES_NODE -R gds-rs ptrancos2
trancos-4-rs
ptrancos2(/root)$ scha_resource_get -Q -O RESOURCE_DEPENDENCIES -R gds-rs
trancos-3-rs@ptrancos1
trancos-4-rs@ptrancos2
ptrancos2(/root)$ scha_resource_get -O NETWORK_RESOURCES_USED -R gds-rs
trancos-4-rs