Home | History | Annotate | Download | only in man3ha
 te
CDDL HEADER START

The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.

You can obtain a copy of the license at CDDL.txt
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.

When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at CDDL.txt.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]

CDDL HEADER END
Copyright 2008 Sun Microsystems, Inc. All rights
reserved. Use is subject to license terms.
scds_hasp_check 3HA "13 Aug 2008" "Sun Cluster 3.2" "Sun Cluster HA and Data Services"
NAME
scds_hasp_check - get status information about SUNW.HAStoragePlus resources 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(5) 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 or Resource_dependencies_weak system properties that are defined for the resource.

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.

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

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

.na SCDS_HASP_ERR_CONFIG .ad Indicates that at least one of the SUNW.HAStoragePlus resources on which the resource depends is located in a different resource group.

.na SCDS_HASP_NOT_ONLINE .ad Indicates that a SUNW.HAStoragePlus resource on which the resource depends is not online on any potential primary node or zone.

.na SCDS_HASP_ONLINE_NOT_LOCAL .ad Indicates that at least one SUNW.HAStoragePlus resource on which the resource depends is online, but on another node or zone from which this function is called.

.na SCDS_HASP_ONLINE_LOCAL .ad Indicates that all SUNW.HAStoragePlus resources on which the resource depends are online on the node or zone 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 or zone, the status code is set to SCDS_HASP_NOT_ONLINE rather than SCDS_HASP_ONLINE_NOT_LOCAL.

The scds_hasp_check() function ignores all SUNW.HAStoragePlus resources for which the FilesystemMountPoints or Zpools property is set to an empty list, the default.

PARAMETERS

The following parameters are supported:

.na handle .ad Handle that is returned from scds_initialize(3HA).

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

RETURN VALUES

.na SCHA_ERR_NOERR .ad The function succeeded. This value also indicates that the status code that is stored in hasp_status is valid.

.na SCHA_ERR_INTERNAL .ad The function failed. The value that is stored in hasp_status is undefined. Ignore this undefined value.

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

FILES

.na /usr/cluster/include/rgm/libdsdev.h .ad Include file

.na /usr/cluster/lib/libdsdev.so .ad Library

ATTRIBUTES

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

ATTRIBUTE TYPEATTRIBUTE VALUE
AvailabilitySUNWscdev
Interface StabilityEvolving
SEE ALSO

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