Oracle® Solaris Cluster Reference Manual

Exit Print View

Updated: July 2014, E39662-01
 
 

scds_hasp_check (3HA)

Name

scds_hasp_check - get status information aboutSUNW.HAStoragePlusresources that are used by a resource

Synopsis

cc [flags…] –I /usr/cluster/include file –L /usr/cluster/lib 
     –l dsdev#include <rgm/libdsdev.h>
     scha_err_t scds_hasp_check(scds_handle_t handle, 
     scds_hasp_status_t *hasp_status);

Description

The scds_hasp_check()() function retrieves status information about SUNW.HAStoragePlus resources that are used by a resource. This information is obtained from the state, online or otherwise, of all SUNW.HAStoragePlus resources on which the resource depends. This state is obtained by using the Resource_dependencies, Resource_dependencies_weak, Resource_dependencies_restart, or Resource_dependencies_offline_restart properties that are defined for the resource.

If the FileSystemMountPoints property of a SUNW.HAStoragePlus resource is nonempty, the scds_hasp_check()() function considers the resource to be online on a given node, if and only if all the file systems that are listed in the FileSystemMountPoints property are currently mounted on that node. File systems that are mounted globally might be mounted on a node where the SUNW.HAStoragePlus resource is offline. All of the FileSystemMountPoints, whether mounted locally or globally, must be mounted on a node for the SUNW.HAStoragePlus resource to be considered online on that node. The actual state of the resource might be online or offline. If any of these file systems are not mounted on the node, the resource is considered to be offline and its actual state will also be offline.

Resource type implementations can use scds_hasp_check()() in VALIDATE and MONITOR_CHECK method callback implementations to determine whether checks that are specific to any file systems that are managed by SUNW.HAStoragePlus resources should be carried out.

Resource dependencies are only checked within the same cluster context in which the function is executed, either global cluster or zone cluster. Dependencies of the form clustername: resourcename (inter-cluster dependencies) are ignored. For example, if the only HAStoragePlus dependency is an intercluster dependency, the function returns the status code SCDS_HASP_NO_RESOURCE.

When the function succeeds, a status code is stored in the hasp_status parameter. This code can be one of the following values:

SCDS_HASP_NO_RESOURCE

Indicates that the resource does not depend on a SUNW.HAStoragePlus resource.

SCDS_HASP_NOT_ONLINE

Indicates that a SUNW.HAStoragePlus resource on which the resource depends is not online on any potential primary node.

SCDS_HASP_ONLINE_NOT_LOCAL

Indicates that at least one SUNW.HAStoragePlus resource on which the resource depends is not online on the node from which this function is called but is online on another node.

SCDS_HASP_ONLINE_LOCAL

Indicates that all SUNW.HAStoragePlus resources on which the resource depends are online on the node from which this function is called.


Note -  The preceding status codes have precedence over each other in the order in which they appear. For example, if a SUNW.HAStoragePlus resource is not online and another SUNW.HAStoragePlus resource is online on a different node, the status code is set to SCDS_HASP_NOT_ONLINE rather than SCDS_HASP_ONLINE_NOT_LOCAL.

The scds_hasp_check()() function ignores SUNW.HAStoragePlus resources for which the FilesystemMountPoints and Zpools properties are both set to an empty list, which is the default, even if the GlobalDevicePaths property is nonempty.

Parameters

The following parameters are supported:

handle

Handle that is returned from scds_initialize.

hasp_status

Status of SUNW.HAStoragePlus resources that are used by the resource.

Return Values

SCHA_ERR_NOERR

The function succeeded.

This value also indicates that the status code that is stored in the hasp_status parameter is valid.

SCHA_ERR_INTERNAL

The function failed.

The value that is stored in the hasp_status parameter is undefined. Ignore this undefined value.

See the scha_calls(3HA) man page for a description of other error codes.

Files

/usr/cluster/include/rgm/libdsdev.h

Include file

/usr/cluster/lib/libdsdev.so

Library

Attributes

See attributes (5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
ha-cluster/developer/api
Interface Stability
Evolving

See also

scds_initialize(3HA), scha_calls(3HA), attributes (5) , SUNW.HAStoragePlus(5)