Sun Cluster Data Services Developer's Guide for Solaris OS

Resource Group Functions

You can access information about a resource group or restart a resource group with these functions.

scha_resourcegroup_open(), scha_resourcegroup_get(), and scha_resourcegroup_close()

These functions access information about a resource group that is managed by the RGM. The scha_resourcegroup_open() function initializes access to a resource group and returns a handle for scha_resourcegroup_get(), which accesses the resource group information. The scha_resourcegroup_close() function invalidates the handle and frees memory that is allocated for scha_resourcegroup_get() return values.

A resource group can change, through cluster reconfiguration or administrative action, after scha_resourcegroup_open() returns the resource group's handle. As a result, the information that scha_resourcegroup_get() obtains through the handle might be inaccurate. In cases of cluster reconfiguration or administrative action on a resource group, the RGM returns the scha_err_seqid error code to scha_resourcegroup_get() to indicate that information about the resource group might have changed. This error message is non-fatal. The function returns successfully. You can choose to ignore the message and accept the returned information. Alternatively, you can close the current handle and open a new handle to access information about the resource group.

One man page describes these three functions. You can access this man page through any of the individual functions scha_resourcegroup_open(3HA), scha_resourcegroup_get(3HA), and scha_resourcegroup_close(3HA).

scha_control() and scha_control_zone()

Requests the restart of a resource group that is under the control of the RGM or its relocation to a different node or zone. These functions are described in more detail in the scha_control(3HA) and scha_control_zone(3HA) man pages.