Sun Cluster Data Services Developer's Guide for Solaris OS

RMAPI Shell Commands

Shell commands are used in shell script implementations of the callback methods for resource types that represent services that are controlled by the cluster's RGM.

You can use these commands to complete the following tasks:


Note –

Although this section provides brief descriptions of the shell commands, the 1HA man pages provide the definitive reference for the shell commands. A man page of the same name is associated with each command, unless otherwise noted.


RMAPI Resource Commands

You can access information about a resource or set the Status and Status_msg properties of a resource with these commands.

scha_resource_get

Accesses information about a resource or resource type that is under the control of the RGM. This command provides the same information as the scha_resource_get() C function. For details, see the scha_resource_get(1HA) man page.

scha_resource_setstatus

Sets the Status and Status_msg properties of a resource that is under the control of the RGM. This command is used by the resource's monitor to indicate the state of the resource as perceived by the monitor. This command provides the same functionality as the scha_resource_setstatus() C function. This command is described in more detail in the scha_resource_setstatus(1HA) man page.


Note –

Although scha_resource_setstatus() is of particular use to a resource monitor, any program can call it.


Resource Type Command

scha_resourcetype_get

Accesses information about a resource type that is registered with the RGM. This command provides the same functionality as the scha_resourcetype_get() C function. This command is described in more detail in the scha_resourcetype_get(1HA) man page.

Resource Group Commands

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

scha_resourcegroup_get

Accesses information about a resource group that is under the control of the RGM. This command provides the same functionality as the scha_resourcetype_get() C function. This command is described in more detail in the scha_resourcegroup_get(1HA) man page.

scha_control

Requests the restart of a resource group that is under the control of the RGM or its relocation to a different node. This command provides the same functionality as the scha_control() and scha_control_zone() C functions. This command is described in more detail in the scha_control(1HA) man page.

Cluster Command

scha_cluster_get

Accesses information about a cluster, such as the cluster name, node name, zone name, IDs, states, and resource groups. This command provides the same information as the scha_cluster_get() C function. This command is described in more detail in the scha_cluster_get(1HA) man page.