Sun Cluster 3.0 Data Services Developers' Guide

Accessing Resource and Resource Group Property Information

The callback methods that enable the RGM to control activation of cluster resources might require access to the properties of that resource. The API provides both shell commands and C functions that you can use in callback methods to access the system-defined and extension properties of resources.

You cannot use the property mechanism to store dynamic state information for a data service because no API functions are available for setting resource properties (other than the function for setting Status and Status_msg). Rather, you should store dynamic state information in global files.


Note -

The cluster administrator can set certain resource properties using the scrgadm(1M) command or through an available graphical administrative interface.


The C function for resource property access has a variable argument interface. The API defines string-valued tags that indicate an operation and determine the interpretation of the variable argument list. The "get" access function works in conjunction with "open" and "close" functions that do initialization, finalization, and memory management.

You use three functions together for resource property access:

A single man page describes these three functions. You can access this man page through any of the individual functions, scha_resource_open(3HA), scha_resource_get(3HA), or scha_resource_close(3HA).

A command version of scha_resource_get is provided for use in shell scripts. The command takes as flagged arguments an operation tag, the resource name, and its group name. Additional unflagged arguments might be available for some operation tags. The scha_resource_get(1HA) man page provides details on this access command.