JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Reference Manual     Oracle Solaris Cluster
search filter icon
search icon

Document Information

Preface

Introduction

OSC33 1

OSC33 1cl

claccess(1CL)

cldev(1CL)

cldevice(1CL)

cldevicegroup(1CL)

cldg(1CL)

clinterconnect(1CL)

clintr(1CL)

clmib(1CL)

clnas(1CL)

clnasdevice(1CL)

clnode(1CL)

clq(1CL)

clquorum(1CL)

clreslogicalhostname(1CL)

clresource(1CL)

clresourcegroup(1CL)

clresourcetype(1CL)

clressharedaddress(1CL)

clrg(1CL)

clrs(1CL)

clrslh(1CL)

clrssa(1CL)

clrt(1CL)

clsetup(1CL)

clsnmphost(1CL)

clsnmpmib(1CL)

clsnmpuser(1CL)

clta(1CL)

cltelemetryattribute(1CL)

cluster(1CL)

clvxvm(1CL)

clzc(1CL)

clzonecluster(1CL)

OSC33 1ha

OSC33 1m

OSC33 3ha

OSC33 4

OSC33 5

OSC33 5cl

OSC33 7

OSC33 7p

Index

clresource

, clrs

- manage resources for Oracle Solaris Cluster data services

Synopsis

/usr/cluster/bin/clresource subcommand 
 [-?]
/usr/cluster/bin/clresource  -V
/usr/cluster/bin/clresource subcommand 
 [options] -v  [resource]...
/usr/cluster/bin/clresource clear  [-f errorflag]
 [-g  [resourcegroup,]...] [-t  [resourcetype,]...]
 [ [-z zone]  -n node[:zone][,…]]  [-Z {zoneclustername | global}] {+ |  resource...}
/usr/cluster/bin/clresource create  -g resourcegroup
 -t resourcetype [-d] [-p  "property-name[{node-specifier}]"=value]
 [-x  "extension-property[{node-specifier}]"=value]
 [-y  standard-property=value]  [-Z {zoneclustername | global}] resource
/usr/cluster/bin/clresource create  -i {- |  clconfiguration}
 -t resourcetype [-a] [-d] [-g  [resourcegroup,]...]
 [-p  "property-name[{node-specifier}]"=value] [-x 
 "extension-property[{node-specifier}]"=value] [-y 
 standard-property=value] {+ |  resource...}
/usr/cluster/bin/clresource delete  [-F] [-g  [resourcegroup,]...]
 [-t  [resourcetype,...]]  [-Z {zoneclustername | global}] {+ |  resource...}
/usr/cluster/bin/clresource disable  [-r] [-g  [resourcegroup,]...]
 [-t  [resourcetype,]...] [ [-z zone]  -n node[:zone][,…]]
 [-Z {zoneclustername | global}] {+ |  resource...}
/usr/cluster/bin/clresource enable  [-r] [-g  [resourcegroup,]...]
 [-t  [resourcetype,]...] [ [-z zone]  -n node[:zone][,…]]
 [-Z {zoneclustername | global}] {+ |  resource...}
/usr/cluster/bin/clresource export  [-o  {- |  configfile}]
 [+ |  resource...]
/usr/cluster/bin/clresource list  [-g  [resourcegroup,]...]
 [-t  [resourcetype,]...] [ [ [-z zone]  -n node[:zone][,…]]]
 [-Z {zoneclustername [,...] | global | all}] [+ |  resource...]
/usr/cluster/bin/clresource list-props  [-l listtype]
 [-g  [resourcegroup,]...] [-p  "property-name[{node-specifier,…}]",...]
 [-t  [resourcetype,]...] [-x  "extension-property[{node-specifier,…}]"...]
 [-y  "standard-property[{node-specifier,…}]",...]
 [-Z {zoneclustername [,...] | global | all}] [+ |  resource...]
/usr/cluster/bin/clresource monitor  [-g  [resourcegroup,]...]
 [-t  [resourcetype,]...] [ [-z zone]  -n node[:zone][,…]]
 [-Z {zoneclustername | global}] {+ |  resource...}
/usr/cluster/bin/clresource set  [-g  [resourcegroup,]...]
 [-p "property-name[{node-specifier,…}]" [+=
 |  -=]value] [-t  [resourcetype,]...] [-x "extension-property[{node-specifier,…}]"
 [+= |  -=]value] [-y standard-property [+= |  -=]value]
 [-Z {zoneclustername | global}] {+ |  resource...}
/usr/cluster/bin/clresource show  [-g  [resourcegroup,]...]
 [-p  property-name[{node-specifier,…}]",...]
 [-t  [resourcetype,]...] [-x  "extension-property[{node-specifier,…}]",...]
 [-y  "standard-property[{node-specifier,…}]",...]
 [-Z {zoneclustername [,...] | global | all}] [+ |  resource...]
/usr/cluster/bin/clresource status  [-g  [resourcegroup,]...]
 [-s  [state,]...] [-t  [resourcetype,]...] [ [-z zone] 
 -n node[:zone][,…]]  [-Z {zoneclustername [,...] | global | all}] [+ |  resource...]
/usr/cluster/bin/clresource unmonitor  [-g  [resourcegroup,]...]
 [-t  [resourcetype,]...] [ [-z zone]  -n node[:zone][,…]]
 [-Z {zoneclustername | global}] {+ |  resource...}

Description

The clresource command manages resources for Oracle Solaris Cluster data services. The clrs command is the short form of the clresource command. The clresource command and the clrs command are identical. You can use either form of the command.

The general form of this command is as follows:

clresource  [subcommand] [options] [operands]

You can omit subcommand only if options specifies the-? option or the -V option.

Each option of this command has a long form and a short form. Both forms of each option are provided with the description of the option in the OPTIONS section of this man page.

Using This Command in a Non-Global Zone

You can use the clresource command with all subcommands in the global-cluster node. When you use the clresource command in a non-global zone, the following restrictions apply:

For ease of administration, you might prefer to run all forms of the command in the global-cluster node.

Using This Command in a Zone Cluster

You can use the clresource command with all subcommands except export in a zone cluster.

You can also use the -Z option with all subcommands except export to specify the name of a particular zone cluster to which you want to restrict an operation. And, you can also attach the zone-cluster name to a resource name (zoneclustername : resource) to restrict an operation to a particular zone cluster.

You can access all zone cluster information from a global-cluster node, but a particular zone cluster is not aware of other zone clusters. If you do not restrict an operation to a particular zone cluster, the subcommand you use operates in the current cluster only.


Note - The -z option and the -Z option are mutually exclusive for all subcommands.


A resource in a zone cluster can have a dependency on a resource in another zone cluster or on a resource on the global cluster. Also, a resource from the global cluster can have a dependency on a resource in any of the zone clusters on that global cluster. The inter-cluster dependencies can be set only from the global cluster.

You can use the following command to specify the inter-cluster dependencies:

# clresource set -p resource_dependencies=target-zc:target-rs source-zc:source-rs

For example, if you need to specify a dependency from resource R1 in zone cluster ZC1 to a resource R2 in zone cluster ZC2, use the following command:

# clresource set -p resource_dependencies=ZC2:R2 ZC1:R1

If you need to specify a dependency of zone cluster ZC1 resource R1 on global-cluster resource R2, use the following command:

# clresource set -p resource_dependencies=global:R2 ZC1:R1

The existing resource dependencies (Strong, Weak, Restart, and Offline-Restart) are supported.

Resource State and Status

The resource state and resource status are maintained on a per-node basis. A given resource has a distinct state on each cluster node and a distinct status on each cluster node.

Resource Group Manager (RGM) sets the resource state on each node, based on which methods have been invoked on the resource. For example, after the STOP method has run successfully on a resource on a given node, the resource's state will be OFFLINE on that node. If the STOP method exits nonzero or times out, then the state of the resource is Stop_failed.

Possible resource states include the following:


Note - State names, such as Offline and Start_failed, are not case sensitive. You can use any combination of uppercase and lowercase letters when you specify state names.


In addition to resource state, the RGM also maintains a resource status that can be set by the resource itself by using the API. The field Status Message actually consists of two components: status keyword and status message. Status message is optionally set by the resource and is an arbitrary text string that is printed after the status keyword.

Descriptions of possible values for a resource's status are as follows:

DEGRADED

The resource is online, but its performance or availability might be compromised in some way.

FAULTED

The resource has encountered an error that prevents it from functioning.

OFFLINE

The resource is offline.

ONLINE

The resource is online and providing service.

UNKNOWN

The current status is unknown or is in transition.

SUBCOMMANDS

The following subcommands are supported:

clear

Clears an error flag that is associated with the resources that are specified as operands to the command. This subcommand accepts the plus sign (+) as an operand to specify that the error flag is cleared for all resources.

You can use this subcommand in the global cluster or in a zone cluster.

The following options filter the list of operands to limit the resources on which an error flag is cleared:

-g resourcegroup

Clears only the resources in the list of operands that are members of the resource groups in resourcegroup.

-n node

Clears the resources on the specified node or nodes. If you do not provide an -n option, the command clears resources on all nodes.

-t resourcetype

Clears only the resources in the list of operands that are instances of the resource types in resourcetype.

-Z {zoneclustername | global}

Clears only the resources in the particular cluster or clusters that you specify. To clear the resources in a zone cluster from the global cluster, specify the zone cluster by using the -Z option.

In a non-global zone, clresource clear operates on resources that can be mastered by the non-global zone.

By default, the clear subcommand clears the STOP_FAILED error flag. To specify explicitly the error flag that is to be cleared, use the -f option. The only error flag that the -f option accepts is the STOP_FAILED error flag.

Users other than superuser require solaris.cluster.admin RBAC authorization to use this subcommand.

create

Creates the resources that are specified as operands to the command.

You can use this subcommand in the global cluster or in a zone cluster.

To create a resource in the specific zone cluster from the global cluster, you can use the -Z option to specify the name of the zone cluster.

When you use create with the -i option to specify a configuration file, the subcommand accepts the plus sign (+) as an operand. When you use the + operand, all resources in the configuration file that do not exist are created.

By default, resources are created in the enabled state with monitoring enabled. However, a resource is brought online and is monitored only after the resource's resource group is brought online. To create resources in the disabled state, specify the -d option.

Use the following options to set property values when creating a resource:

-p property-name=value

Sets standard or extension properties, as long as their names are unique.

-x extension-property=value

Sets extension properties.

-y standard-property=value

Sets standard properties.

node-specifier is an optional qualifier to the -p and -x options. It indicates that the properties on only the specified node or nodes, or on the specified zone or zones, are to be set when the resource is created. The specified properties on other nodes or zones in the cluster are not set. If you do not include node-specifier, the specified properties in all zones on all nodes in the cluster are set. Examples of the syntax of node-specifier include the following:

-x "myprop{phys-schost-1}"

The braces ({}) indicate that you want to set the specified property on only node phys-schost-1. For most shells, braces must be quoted.

You can use the following syntax to set a property on two nodes:

-x "myprop{phys-schost-1,phys-schost-2}"

When in a non-global zone, clresource create operates on resources that can be mastered by the non-global zone and that have the property Global_zone=FALSE.

Users other than superuser require solaris.cluster.modify role-based access control (RBAC) authorization to use this subcommand.

See also the description of the delete subcommand.

delete

Deletes the resources that are specified as operands to the command. This subcommand accepts the plus sign (+) as an operand to specify that all resources are deleted.

You can use this subcommand in the global cluster or in a zone cluster.

This subcommand deletes multiple resources in the order that is required to satisfy dependencies between the resources. The subcommand disregards the order in which you specify resources on the command line.

When you delete multiple resources at the same time, the command is carried out in several steps. If the command is interrupted, for example, if a node fails, some resources might be left in an invalid configuration. To correct the problem and finish deleting the resources, reissue the same command on a healthy node.

The following options filter the list of operands to limit the resources that are deleted:

-g resourcegroup

Deletes only the resources in the list of operands that are members of the resource groups in resourcegroup.

-t resourcetype

Deletes only the resources in the list of operands that are instances of the resource types in resourcetype.

-Z {zoneclustername | global}

Deletes only the resources in the particular cluster or clusters that you specify. To delete the resources in a zone cluster from the global cluster, specify the zone cluster by using the -Z option.

By default, a resource is deleted only if the following conditions are met:

  • The resource must be disabled.

  • All dependencies on the resource must be eliminated.

To force deletion of the specified resources, specify the -F option. Use this option with caution, because it has the following effects:

  • All specified resources are deleted, even resources that are not disabled.

  • All specified resources are removed from resource-dependency settings of other resources.

These effects might cause a loss of service in the cluster. Dependent resources that are not deleted might also be left in an invalid state or in an error state.

When in a non-global zone, clresource delete operates on resources that can be mastered by the non-global zone and that have the property Global_zone=FALSE.

Users other than superuser require solaris.cluster.modify RBAC authorization to use this subcommand.

See also the description of the create subcommand.

disable

Disables the resources that are specified as operands to the command. This subcommand accepts the plus sign (+) as an operand to specify that all resources are disabled.

You can use this subcommand in the global cluster or in a zone cluster.

The following options filter the list of operands to limit the resources that are disabled:

-g resourcegroup

Disables only the resources in the list of operands that are members of the resource groups in resourcegroup.

-n node

You can use -n node or -n node:zone to disable resources on one or more nodes or in one or more zones.

-t resourcetype

Disables only the resources in the list of operands that are instances of the resource types in resourcetype.

-Z {zoneclustername | global}

Disables only the resources in the particular cluster or clusters that you specify. To delete the resources in a zone cluster from the global cluster, specify the zone cluster by using the -Z option.

The -r option disables any resources that depend on the resources that are specified as operands to the command. These resources are disabled even if the resources are not specified as operands to the command. The -g option and the -t option do not apply to resources that are to be disabled solely to satisfy resource dependencies.

This subcommand does not affect the monitoring status of the resource. If the resource was monitored when enabled, it is still monitored after the disable. If the resource is subsequently re-enabled, the resource is also monitored.

This subcommand disables resources in the order that is required to satisfy dependencies between the resources. The subcommand disregards the order in which resources are specified at the command line.

When in a non-global zone, clresource disable operates on resources that can be mastered by the non-global zone.

Users other than superuser require solaris.cluster.admin RBAC authorization to use this subcommand.

See also the description of the enable subcommand.

enable

Enables the resources that are specified as operands to the command. This subcommand accepts the plus sign (+) as an operand to specify that all resources are enabled.

You can use this subcommand in the global cluster or in a zone cluster.

The following options filter the list of operands to limit the resources that are enabled:

-g resourcegroup

Enables only the resources in the list of operands that are members of the resource groups in resourcegroup.

-n node

You can use -n node or -n node:zone to enable resources on one or more nodes or in one or more zones.

-t resourcetype

Enables only the resources in the list of operands that are instances of the resource types in resourcetype.

-Z {zoneclustername | global}

Enables only the resources in the particular cluster or clusters that you specify. To enable the resources in a zone cluster from the global cluster, specify the zone cluster by using the -Z option.

To ensure that all required resource dependencies are satisfied, specify the -r option. The -r option enables any resources on which the resources that are specified as operands to the command depend. These resources are enabled, even if the resources are not specified as operands to the command. The -g option and the -t option do not apply to resources that are to be enabled solely to satisfy resource dependencies.

Resources are enabled in the order that is required to satisfy dependencies between the resources. The subcommand disregards the order in which resources are specified at the command line.

When in a non-global zone, clresource enable operates on resources that can be mastered by the non-global zone.

Users other than superuser require solaris.cluster.admin RBAC authorization to use this subcommand.

See also the description of the disable subcommand.

export

Exports the cluster resource configuration in the format that is described by the clconfiguration(5CL) man page.

You can use this subcommand only in the global cluster.

Users other than superuser require solaris.cluster.read RBAC authorization to use this subcommand.

list

Displays a list of the resources that are specified as operands to the command. By default, all resources are displayed.

You can use this subcommand in the global cluster or in a zone cluster.

The following options filter the list of operands to limit the resources that are displayed:

-g resourcegroup

Displays only the resources in the list of operands that are members of the resource groups in resourcegroup.

-n node

You can use -n node or -n node:zone to list only those resources that are online in one or more zones or on one or more nodes.

-t resourcetype

Displays only the resources that are instances of the resource types in resourcetype.

-Z {zoneclustername | global | all}

Displays only the resources in the particular cluster or clusters that you specify. To display the resources in a zone cluster from the global cluster, specify the zone cluster by using the -Z option.

This subcommand accepts the plus sign (+) as an operand to specify that all the resource configuration is displayed. You can restrict the displayed information to specific resource groups or resource types by specifying a -g option or -t option. If no operands are supplied, all resources in the specified resource groups or that are instances of the specified resource types are displayed.

If you specify the -v option, the resource group and resource type of each resource in the list are also displayed.

Users other than superuser require solaris.cluster.read RBAC authorization to use this subcommand.

list-props

Displays a list of the properties of the resources that are specified as operands to the command.

You can use this subcommand in the global cluster or in a zone cluster.

The following options filter the list of operands to limit the resources whose properties are displayed:

-g resourcegroup

Displays the properties only of the resources in the list of operands that are members of the resource groups in resourcegroup.

-t resourcetype

Displays the properties only of the resources in the list of operands that are instances of the resource types in resourcetype.

The -l option specifies the type of resource properties that are to be displayed:

-l all

Specifies that standard properties and extension properties are displayed.

-l extension

Specifies that only extension properties are displayed. By default, only extension properties are displayed.

-l standard

Specifies that only standard properties are displayed.

If you do not specify the -l option, only extension properties are displayed. To display standard properties, specify the properties explicitly by using the -p option or the -y option.

The following options limit the set of resource properties that is to be displayed:

-p property-name

Displays only the properties that are specified in property-name. You can specify standard properties and extension properties in property-name.

-x extension-property

Displays only the extension properties on one or more nodes that are specified in extension-property.

-y standard-property

Displays only the standard properties that are specified in standard-property.

node-specifier is an optional qualifier to the -p, -x, and -y options. It indicates that the properties on only the specified node or nodes, or on the specified zone or zones, are to be displayed. The specified properties on other nodes or zones in the cluster are not displayed. If you do not include node-specifier, the specified properties in all zones on all nodes in the cluster are displayed. Examples of the syntax of node-specifier include the following:

-x "myprop{phys-schost-1}"

The braces ({}) indicate that you want to display the specified property on only node phys-schost-1. For most shells, braces must be quoted.

You can use the following syntax to display a property on two nodes:

-x "myprop{phys-schost-1,phys-schost-2}"

If you specify the -v option, the description of each property is also displayed.

This subcommand accepts the plus sign (+) as an operand to specify that all resource properties are displayed. If no operands are supplied, properties of all resources in the specified resource groups or that are instances of the specified resource types are displayed.

Users other than superuser require solaris.cluster.read RBAC authorization to use this subcommand.

-Z {zoneclustername | global | all}

Lists the properties of resources in the particular cluster or clusters that you specify. To list the resources in a zone cluster from the global cluster, specify the zone cluster by using the -Z option.

monitor

Turns on monitoring for the resources that are specified as operands to the command. This subcommand accepts the plus sign (+) as an operand to specify that monitoring is turned on for all resources.

You can use this subcommand in the global cluster or in a zone cluster.

The following options filter the list of operands to limit the resources for which monitoring is turned on:

-g resourcegroup

Turns on monitoring only for the resources in the list of operands that are members of the resource groups in resourcegroup.

-n node

Turns on monitoring for only those resources that are online in one or more zones or on one or more nodes.

-t resourcetype

Turns on monitoring only for the resources in the list of operands that are instances of the resource types in resourcetype.

-Z {zoneclustername | global}

Turns on monitoring only for the resources in the particular cluster or clusters that you specify. To turn on the resources in a zone cluster from the global cluster, specify the zone cluster by using the -Z option.

If monitoring is turned on for a resource, the resource is monitored only if the following conditions are met:

  • The resource is enabled.

  • The resource group that contains the resource is online on at least one cluster node.


Note - When you turn on monitoring for a resource, you do not enable the resource.


When in a non-global zone, clresource monitor operates on resources that can be mastered by the non-global zone.

Users other than superuser require solaris.cluster.admin RBAC authorization to use this subcommand.

See also the description of the unmonitor subcommand.

set

Sets specified properties of the resources that are specified as operands to the command. This subcommand accepts the plus sign (+) as an operand to specify that the specified properties of all resources are modified.

You can use this subcommand in the global cluster or in a zone cluster.

The following options filter the list of operands to limit the resources for which properties are modified:

-g resourcegroup

Modifies properties of only the resources in the list of operands that are members of the resource groups in resourcegroup.

-t resourcetype

Modifies properties of only the resources in the list of operands that are instances of the resource types in resourcetype.

Use the following options to set property values:

-p property-name=value

Sets standard or extension properties, as long as their names are unique.

-x extension-property=value

Sets extension properties.

-y standard-property=value

Sets standard properties.

node-specifier is an optional qualifier to the -p and -x options. It indicates that the properties on only the specified node or nodes, or on the specified zone or zones, are to be set when the resource is created. The specified properties on other nodes or zones in the cluster are not set. If you do not include node-specifier, the specified properties in all zones on all nodes in the cluster are set. Examples of the syntax of node-specifier include the following:

-x "myprop{phys-schost-1}"

The braces ({}) indicate that you want to set the specified property on only node phys-schost-1. For most shells, braces must be quoted.

You can use the following syntax to set a property on two nodes:

-x "myprop{phys-schost-1,phys-schost-2}"
-Z {zoneclustername | global}

Sets the properties only for resources in the particular cluster or clusters that you specify. To set the properties of resources in a zone cluster from the global cluster, specify the zone cluster by using the -Z option.

When in a non-global zone, clresource set operates on resources that can be mastered by the non-global zone.

Users other than superuser require solaris.cluster.modify RBAC authorization to use this subcommand.

show

Displays the configuration of the resources that are specified as operands to the command. By default, the configuration of all resources is displayed.

You can use this subcommand in the global cluster or in a zone cluster.

The following options filter the list of operands to limit the list of resources for which the configuration is displayed:

-g resourcegroup

Displays the configuration of only the resources in the list of operands that are members of the resource groups in resourcegroup.

-n node

You can use -n node or -n node:zone to display the configuration of only those resources that are online in one or more zones or on one or more nodes.

-t resourcetype

Displays the configuration of only the resources in the list of operands that are instances of the resource types in resourcetype.

-Z {zoneclustername | global | all}

Displays only the resources in the particular cluster or clusters that you specify. To display the resources in a zone cluster from the global cluster, specify the zone cluster by using the -Z option.

The following options limit the set of resource properties that are displayed:

-p property-name

Displays only the properties that are specified in property-name. You can specify standard properties and extension properties in property-name.

-x extension-property

Displays only the extension properties on one or more nodes that are specified in extension-property.

-y standard-property

Displays only the standard properties that are specified in standard-property.

node-specifier is an optional qualifier to the -p, -x, and -y options. It indicates that the properties on only the specified node or nodes, or on the specified zone or zones, are to be displayed. The specified properties on other nodes or zones in the cluster are not displayed. If you do not include node-specifier, the specified properties in all zones on all nodes in the cluster are displayed. Examples of the syntax of node-specifier include the following:

-x "myprop{phys-schost-1}"

The braces ({}) indicate that you want to display the specified property on only node phys-schost-1. For most shells, braces must be quoted.

You can use the following syntax to display a property on two nodes:

-x "myprop{phys-schost-1,phys-schost-2}"

This subcommand accepts the plus sign (+) as an operand to specify all resource configuration is to be displayed. You can restrict the displayed information to specific resource groups or resource types by specifying a -g option or -t option. If you do not supply an operand, the subcommand displays the configuration of all specified resources.

Users other than superuser require solaris.cluster.read RBAC authorization to use this subcommand.

status

Displays the status of the resources that are specified as operands to the command. By default, the status of all resources is displayed.

The following options filter the list of operands to limit the list of resources for which the status is displayed:

-g resourcegroup

Displays the status of only the resources in the list of operands that are members of the resource groups in resourcegroup.

-n node

You can use -n node or -n node:zone to display the status of only those resources that are online in one or more zones or on one or more nodes. You cannot specify the -n and -s options together.

-s state

Displays the status of only the resources in the list of operands that are in the states in state. You cannot specify the -n and -s options together.

-t resourcetype

Displays the status of only the resources in the list of operands that are instances of the resource types in resourcetype.

-Z {zoneclustername | global | all}

Displays the status of resources in the particular cluster or clusters that you specify. To display the status of resources in a zone cluster from the global cluster, specify the zone cluster by using the -Z option.

You cannot specify the -Z option and a non-global zone with the -n option on the same command line.

This subcommand accepts the plus sign (+) as an operand to specify that the status of all resources is to be displayed. You can restrict the displayed information to specific resource groups or resource types by specifying a -g option or -t option. If no operands are supplied, the status of all specified resources is displayed.

Users other than superuser require solaris.cluster.read RBAC authorization to use this subcommand.

unmonitor

Turns off monitoring for the resources that are specified as operands to the command. This subcommand accepts the plus sign (+) as an operand to specify that monitoring is turned off for all resources.

You can use this subcommand in the global cluster or in a zone cluster.

If you turn off monitoring for a resource that is disabled, the resource is not affected. The resource and its monitor are already offline.


Note - When you turn off monitoring for a resource, you do not disable the resource. However, when you disable a resource, you do not need to turn off monitoring for the resource. The disabled resource and its monitor are kept offline.


The following options filter the list of operands to limit the resources for which monitoring is turned off:

-g resourcegroup

Turns off monitoring only for the resources in the list of operands that are members of the resource groups in resourcegroup.

-n node

Turns off monitoring for only those resources that are online in one or more zones or on one or more nodes.

-t resourcetype

Turns off monitoring only for the resources in the list of operands that are instances of the resource types in resourcetype.

-Z {zoneclustername | global}

Turns off monitoring only for resources in the particular cluster or clusters that you specify. To turn off the monitoring of resources in a zone cluster from the global cluster, specify the zone cluster by using the -Z option.

When in a non-global zone, clresource unmonitor operates on resources that can be mastered by the non-global zone.

Users other than superuser require solaris.cluster.admin RBAC authorization to use this subcommand.

See also the description of the disable subcommand and the monitor subcommand.

Options

The following options are supported:

-?
--help

Displays help information. When this option is used, no other processing is performed.

You can specify this option without a subcommand or with a subcommand.

If you specify this option without a subcommand, the list of subcommands for this command is displayed.

If you specify this option with a subcommand, the usage options for the subcommand are displayed.

-a
--automatic

Automatically performs the following additional operations when resources are being created from a cluster configuration file (clconfiguration(5CL)):

  • Registering resource types

  • Creating resource groups

  • Creating resources on which the resources that are specified in the list of operands depend

The cluster configuration information must contain sufficient information to do all of the following:

  • Enable the resource types to be registered

  • Enable the resource groups to be created

  • Enable the resources to be created

You can specify this option only with the create subcommand. If you specify this option, you must also specify the -i option and provide a configuration file.

-d
--disable

Disables a resource when the resource is created. You can specify this option only with the create subcommand. By default, resources are created in the enabled state.

Enabling a resource does not guarantee that the resource is brought online. A resource is brought online only after the resource's resource group is brought online on at least one node.

-f errorflag
--flag=errorflag
--flag errorflag

Specifies explicitly the error flag that is to be cleared by the clear subcommand. You can specify this option only with the clear subcommand. By default, the clear subcommand clears the STOP_FAILED error flag.

The only error flag that the -f option accepts is the STOP_FAILED error flag.

-F
--force

Forces the deletion of resources that are not disabled. You can specify this option only with the delete subcommand.

Use this option with caution, because it has the following effects:

  • All specified resources are deleted, even resources that are not disabled.

  • All specified resources are removed from resource-dependency settings of other resources.

These effects might cause a loss of service in the cluster. Dependent resources that are not deleted might also be left in an invalid state or in an error state.

-g resourcegroup[,…]
--resourcegroup=resourcegroup-[,…]
--resourcegroup resourcegroup-[,…]

Specifies a resource group or a list of resource groups.

For subcommands except create, the command acts on only the resources in the list of operands that are members of the specified resource groups. Specify resource groups by using the -g option.

When you specify the -g option with the create subcommand, clresource creates the resource in the specified resource group. You can specify only one resource group when using this option.

-i {- | clconfiguration}
--input={- | clconfiguration-}
--input {- | clconfiguration-}

Specifies configuration information that is to be used for creating or modifying resources. This information must conform to the format that is defined in the clconfiguration(5CL) man page. This information can be contained in a file or supplied through the standard input. To specify the standard input, specify - instead of a file name.

Only the resources that are supplied as operands to the command are created or are modified. Options that are specified in the command override any options that are set in the configuration information. If configuration parameters are missing in the configuration information, you must specify these parameters at the command line.

When you use the -i option with the create subcommand, clresource registers all required resource types and creates all required resource groups. You must supply all information that is required for the registration and configuration. All other configuration data is ignored.

-l listtype
--listtype=listtype
--listtype listtype

Specifies the type of resource properties that are to be displayed by the list-props subcommand. You can specify this option only with the list-props subcommand.

You must specify one value from the following list for listtype:

all

Specifies that standard properties and extension properties are displayed.

extension

Specifies displayed only extension properties are displayed. By default, only extension properties are displayed.

standard

Specifies that only standard properties are displayed.

If you do not specify the -l option, only extension properties are displayed. To display standard properties, specify the properties explicitly by using the -p option or the -y option.

-n node-[:zone-][,…]
--node=node-[:zone-][,…]
--node node-[:zone-][,…]

Specifies a node or a list of nodes in the target global cluster or zone cluster. You can specify each node as a node name or a node ID. For each node, you can optionally specify a non-global zone on the node.

If the -Z option is specified, then you can specify only zone-cluster hostnames with the -n option and not the global-cluster hostnames. If -Z option is not specified, then you can specify only the global-cluster hostnames with the -n option.

The subcommands with which you can specify this option are as follows:

disable

Disables only the resources in the list of operands that are hosted on the specified nodes or in the specified zones.

enable

Enables only the resources in the list of operands that are hosted on the specified nodes or in the specified zones.

list

Displays a list of only those resources in the list of operands that are hosted on the specified nodes or in the specified zones.

monitor

Monitors only those resources in the list of operands that are hosted on the specified nodes or in the specified zones.

show

Displays the configuration information of only those resources in the list of operands that are hosted on the specified nodes or in the specified zones.

status

Reports the status only of resources in the list of operands that are hosted on the specified nodes or in the specified zones.

unmonitor

Unmonitors only those resources in the list of operands that are hosted on the specified nodes or in the specified zones.

-o {- | clconfiguration-}
--output={- | clconfiguration-}
--output {- | clconfiguration-}

Specifies the location where resource configuration information is to be written. This location can be a file or the standard output. To specify the standard output, specify a dash (-) instead of a file name. If you specify the standard output, all other standard output for the command is suppressed. You can specify this option only with the export subcommand.

Configuration information is written only for the resources that are supplied as operands to the command. The information is written in the format that is defined in the clconfiguration(5CL) man page.

-p property-name-=value
-p property-name-+=array-values
-p property-name--=array-values
--property=property-name-=value
--property property-name-=value
--property=property-name-+=array-values
--property property-name-+=array-values
--property=property-name--=array-values
--property property-name--=array-values

Sets the values of a property for resources that are supplied as operands to the command. You can specify the assignment form of this option only with the create subcommand and the set subcommand.

Use the -p option to specify any standard or extension property. If an extension property of a resource type has the same name as a standard property of that resource type, use of the -p option returns an error. In this situation, use the -x option to specify the extension property and the -y option to specify the standard property.

For a description of standard properties, see the r_properties(5) man page.

For a description of a resource type's extension properties, see the documentation for the resource type.

The operators to use with this option are as follows:

=

Sets the property to the specified value. The create subcommand and the set subcommand accept this operator.

+=

Adds a value or values to a string array value. Only the set subcommand accepts this operator. You can specify this operator only for properties that accept lists of string values, for example Resource_dependencies.

-=

Deletes a value or values from a string array value. Only the set subcommand accepts this operator. You can specify this operator only for properties that accept lists of string values, for example Resource_dependencies.

To set a per-node property on a subset of cluster nodes or zones, specify the nodes or zones when the property is set. Append the list of nodes or zones in braces to the property name as follows:

name{node[:zone]}

node is a comma-separated list of node names, node IDs, or zones. For more information about per-node properties, see the rt_properties(5) man page.

-p property-name-[,…]
--property=property-name-[,...]
--property property-name-[,...]

Specifies a list of properties for the list-props subcommand and show subcommand.

Use the -p option to specify any standard or extension property. If an extension property of a resource type has the same name as a standard property of that resource type, use of the -p option returns an error. In this situation, use the -x option to specify the extension property and the -y option to specify the standard property.

For a description of standard properties, see the r_properties(5) man page.

For a description of a resource type's extension properties, see the documentation for the resource type.

Without this option, the list-props subcommand and show subcommand list all or most resource properties, depending on whether the -v option is also specified.

-r
--recursive

Recursively enables or disables resources to ensure that all required dependencies are satisfied. You can specify this option only with the disable subcommand and the enable subcommand.

The effect of this option with these subcommands is as follows:

disable

Disables any resources that depend on the resources that are specified as operands to the command. The resources are disabled even if the resources are not specified as operands to the command.

enable

Enables any resources on which resources that are specified as operands to the command depend. The resources are enabled even if the resources are not specified as operands to the command.

-s state-[,…]
--state=state-[,...]
--state state-[,...]

Specifies a list of states for the list subcommand and status subcommand.

This option limits the output to include only those resources that are in one of the specified states on one or more nodes in the node list.

The possible states are as follows:

  • Online

  • Offline

  • Start_failed

  • Stop_failed

  • Monitor_failed

  • Online_not_monitored

  • Starting

  • Stopping

  • Not_online


Note - State names, such as Offline and Start_failed, are not case sensitive. You can use any combination of uppercase and lowercase letters when you specify state names.


-t resourcetype-[,…]
--type=resourcetype-[,...]
--type resourcetype-[,...]

Specifies a resource type or list of resource types.

For all subcommands that accept this option except create, the command acts only on resources that satisfy both of the following qualifications:

  • The resources are in the list of operands.

  • The resources are instances of the resource types that the -t option specifies.

When you specify the -t option with clresource create, you create a resource of the specified type. You can specify only one resource type.

For a description of the format of resource type names, see Legal RGM Names in Oracle Solaris Cluster Data Services Planning and Administration Guide.

-u

If you use the + operand, this option specifies that the command operates on resources whose resource group is suspended.

If you do not specify the -u option when you specify the + operand, the command ignores all resources whose resource group is suspended. The -u option is valid when the + operand is specified with clear, disable, enable, monitor, set, or unmonitor commands.

When you use the + operand with clear, disable, enable, monitor, set, or unmonitor subcommand, the command ignores all resources whose resource groups is suspended unless you also specify the -u option.

-V
--version

Displays the version of the command.

Do not specify this option with subcommands, operands, or other options. The subcommands, operands, or other options are ignored. The -V option displays only the version of the command. No other operations are performed.

-v
--verbose

Displays verbose messages to the standard output.

You can specify this option with any form of the command.

Do not specify the -v option with the -o option. The-v option is ignored. The -o option suppresses all other standard output.

-x extension-property-=value
-x extension-property-+=array-value
-x extension-property--=array-value
--extension-property=extension-property-=value
--extension-property extension-property-=value
--extension-property=extension-property-+=array-value
--extension-property extension-property-+=array-value
--extension-property=extension-property--=array-value
--extension-property extension-property--=array-value

Sets or modifies the value of an extension property of resources that are supplied as operands to the command.

In general, use the -p option to specify any standard or extension property. If an extension property of a resource type has the same name as a standard property of that resource type, use of the -p option returns an error. In this situation, use the -x option to specify the extension property and the -y option to specify the standard property.

You can specify the assignment form of this option only with the create subcommand and the set subcommand.

For a description of a resource type's extension properties, see the documentation for the resource type.

The operators to use with this option are as follows:

=

Sets the property to the specified value. The create subcommand and the set subcommand accept this operator.

+=

Adds a value or values to a string array value. Only the set subcommand accepts this operator. You can specify this operator only for properties that accept lists of string values, for example Resource_dependencies.

-=

Removes a value or values from a string array value. Only the set subcommand accepts this operator. You can specify this operator only for properties that accept lists of string values, for example Resource_dependencies.

To set a per-node property on a subset of cluster nodes or zones, specify the nodes or zones when the property is set. Append the list of nodes or zones in braces to the property name as follows:

name{node[:zone]}

node is a comma-separated list of node names, node IDs, or zones. For more information about per-node properties, see the rt_properties(5) man page.

-x extension-property-[,…]
--extension-property=extension-property-[,...]
--extension-property name-[,...]

Specifies a list of extension properties for the list-props subcommand and the show subcommand.

For a description of a resource type's extension properties, see the documentation for the resource type.

Use the -p option to specify any standard or extension property. If an extension property of a resource type has the same name as a standard property of that resource type, use of the -p option returns an error. In this situation, use the -x option to specify the extension property and the -y option to specify the standard property.

Without this option, the list-props subcommand and the show subcommand list all or most resource properties, depending on whether the -v option is also specified.

-y standard-property-=value
-y standard-property-+=array-value
-y standard-property--=array-value
--standard-property=standard-property-=value
--standard-property standard-property-=value
--standard-property=standard-property-+=array-value
--standard-property standard-property-+=array-value
--standard-property=standard-property--=array-value
--standard-property standard-property--=array-value

Sets or modifies the value of a standard property of resources that are supplied as operands to the command.

Use the -p option to specify any standard or extension property. If an extension property of a resource type has the same name as a standard property of that resource type, use of the -p option returns an error. In this situation, use the -x option to specify the extension property and the -y option to specify the standard property.

You can specify the assignment form of this option only with the create subcommand and the set subcommand.

For a description of standard properties, see the r_properties(5) man page.

The operators to use with this option are as follows:

=

Sets the property to the specified value. The create subcommand and the set subcommand accept this operator.

+=

Adds a value or values to a string array value. Only the set subcommand accepts this operator. You can specify this operator only for properties that accept lists of string values, for example Resource_dependencies.

-=

Removes a value or values from a string array value. Only the set subcommand accepts this operator. You can specify this operator only for properties that accept lists of string values, for example Resource_dependencies.

To set a per-node property on a subset of cluster nodes, specify the subset nodes. Append the list of nodes in braces to the property name as follows:

"standard-property{node-specifier}"

node-specifier is a comma-separated list of node names, node IDs, or zones. It indicates that only the properties on the node or nodes, or on the zone or zones, are affected by the command. For more information about per-node properties, see the rt_properties(5) man page.

-y standard-property-[,…]
--standard-property=standard-property-[,...]
--standard-property standard-property-[,...]

Specifies a list of standard properties for the list-props subcommand and show subcommand.

For a description of standard properties, see the r_properties(5) man page.

Use the -p option to specify any standard or extension property. If an extension property of a resource type has the same name as a standard property of that resource type, use of the -p option returns an error. In this situation, use the -x option to specify the extension property and the -y option to specify the standard property.

Without this option, the list-props subcommand and the show subcommand list all or most resource properties, depending on whether the -v option is also specified.

-z zone
--zone=zone
--zone zone

Applies the same zone name to all nodes in a node list for which a zone is not explicitly specified. You can specify this option only with the -n option.

-Z {zoneclustername | global | all}
--zoneclustername={zoneclustername | global | all}
--zoneclustername {zoneclustername | global | all}

Specifies the cluster or clusters in which the resource exists and on which you want to operate.

This option is supported by all subcommands except the export subcommand.

If you specify this option, you must also specify one argument from the following list:

zoneclustername

Specifies that the command with which you use this option is to operate on all specified resources in only the zone cluster named zoneclustername.

global

Specifies that the command with which you use this option is to operate on all specified resources in the global cluster only.

all

If you use this argument in the global cluster, it specifies that the command with which you use it is to operate on all specified resources in all clusters, including the global cluster and all zone clusters.

If you use this argument in a zone cluster, it specifies that the command with which you use it is to operate on all specified resources in that zone cluster only.

Operands

Only the following operand is supported:

resource

Specifies the resource that is to be managed or the resources that are to be managed. If the subcommand accepts more than one resource, you can use the plus sign (+) to specify all resources.

Exit Status

If the command is successful for all specified operands, it returns zero (CL_NOERR). If an error occurs for an operand, the command processes the next operand in the operand list. The returned exit code always reflects the error that occurred first.

The following exit codes can be returned:

0 CL_NOERR

No error

The command that you issued completed successfully.

1 CL_ENOMEM

Not enough swap space

A cluster node ran out of swap memory or ran out of other operating system resources.

3 CL_EINVAL

Invalid argument

You typed the command incorrectly, or the syntax of the cluster configuration information that you supplied with the -i option was incorrect.

6 CL_EACCESS

Permission denied

The object that you specified is inaccessible. You might need superuser or RBAC access to issue the command. See the su(1M) and rbac(5) man pages for more information.

9 CL_ESTATE

Object is in wrong state

You tried to modify a property, a resource group, or other object that you cannot modify at that particular time or at any time.

10 CL_EMETHOD

Resource method failed

A method of a resource failed. The method failed for one of the following reasons:

  • The validate method failed when you tried to create a resource or modify the properties of a resource.

  • A method other than validate failed when you tried to enable, disable, or delete a resource.

15 CL_EPROP

Invalid property

The property or value that you specified with the -p, -y, or -x option does not exist or is not allowed.

36 CL_ENOENT

No such object

The object that you specified cannot be found for one of the following reasons:

  • The object does not exist.

  • A directory in the path to the configuration file that you attempted to create with the -o option does not exist.

  • The configuration file that you attempted to access with the -i option contains errors.

39 CL_EEXIST

Object exists

The device, device group, cluster interconnect component, node, cluster, resource, resource type, or resource group that you specified already exists.

41 CL_ETYPE

Invalid type

The type that you specified with the -t or -p option does not exist.

These exit values are compatible with the return codes that are described in the scha_calls(3HA) man page.

Examples

Example 1 Creating a Resource

This example creates a resource that is named rs-nfs in a resource group that is named rg-failover. The resource is an instance of the SUNW.nfs resource type. The resource is created in the enabled state and with resource monitoring turned on.

# clresource create -g rg-failover -t SUNW.nfs rs-nfs

Either of the following two commands create a resource that is named rs-nfs in a zone cluster ZC in a resource group that is named rg-failover. These commands can be executed from the global-cluster node, or inside the zone cluster ZC. If you execute the command from a zone cluster, explicitly defining the scope of the resource with the zone-cluster name is optional.

# clresource create -g rg-failover -t SUNW.nfs -Z ZC rs-nfs
# clresource create -g rg-failover -t SUNW.nfs ZC:rs-nfs

Example 2 Turning On Monitoring for a Resource

This example turns on monitoring for a resource that is named rs-nfs.

# clresource monitor rs-nfs

When monitoring is turned on for a resource, it remains on until explicitly turned off by using the clresource unmonitor command. Disabling and enabling a resource does not affect whether it is monitored.

Example 3 Enabling Resources

This example enables all resources in resource groups rg-failover and rg-failover2.

# clresource enable -g rg-failover,rg-failover2 +

This command does not affect whether the resources are monitored.

Example 4 Setting a Resource Property

This example sets the r_description property of all instances of the SUNW.nfs resource type to HA-NFS res.

# clresource set -t SUNW.nfs -p r_description="HA-NFS res" +

Example 5 Setting a Per-Node Resource Property

This example sets the per-node property oracle_sid of the resource rs-oracle to different values on different nodes, as follows:

This example assumes that the brace character has a special meaning to the shell that is used. Therefore, each property name to which the node list is appended is enclosed in double quotes.

# clresource set -p "oracle_sid{phys-schost-1,phys-schost-2}"=myora1 \\
-p "oracle_sid{phys-schost-3}"=myora2 rs-oracle

Example 6 Adding a Value to a String-Array Property

This example adds the value rs-oracle to the string-array property resource_dependencies of the resource rs-myapp. Existing values in this string-array property are unchanged.

# clresource set -p resource_dependencies+=rs-oracle rs-myapp
# clresource show -p resource_dependencies rs-myapp
Resource: rs-myapp
Standard Properties:
Resource_dependencies: rs-nfs rs-oracle

Example 7 Deleting a Resource

This example deletes a resource that is named rs-nfs.

# clresource delete rs-nfs

Example 8 Updating an Entire Cluster Configuration

This example updates an entire cluster configuration by performing the following sequence of operations:

  1. Bringing offline all resource groups in the cluster, deleting all resources, and deleting all resource groups

  2. Unregistering all resource types

  3. Creating all resources that are specified in the configuration file /net/server/export/mycluster.xml, registering their resource types, and creating all required resource groups

# clresourcegroup delete --force +
# clresourcetype unregister +
# clresource -i /net/server/export/mycluster.xml -a +

Example 9 Listing Resources

This example lists all resources.

# clresource list
logicalhost1
rs-nfs-1
rs-nfs-2
logicalhost2
rs-apache-1

Example 10 Listing Resources With Groups and Types

This example lists all resources with their resource groups and resource types.

# clresource list -v

Resource Name      Resource Group    Resource Type
-------------      --------------    -------------
logicalhost1       rg-failover-1     SUNW.LogicalHostname
rs-nfs-1           rg-failover-1     SUNW.nfs
logicalhost2       rg-failover-2     SUNW.LogicalHostname
rs-nfs-2           rg-failover-2     SUNW.nfs
rs-apache-1        rg-failover-1     SUNW.apache

Example 11 Listing Resources of a Specific Type

This example lists all instances of the nfs resource type.

# clresource list -t nfs
rs-nfs-1
rs-nfs-2

Example 12 Listing Extension Properties and Descriptions for a Resource Type

This example lists the extension properties and a description of each extension property for the nfs resource type.

# clresource list-props -t nfs -v
Properties              Descriptions
----------              ------------
Monitor_retry_count     Number of PMF restarts allowed for the fault monitor
Monitor_retry_interval  Time window (minutes) for fault monitor restarts
Rpcbind_nullrpc_timeout Timeout(seconds) to use when probing rpcbind
Nfsd_nullrpc_timeout    Timeout(seconds) to use when probing nfsd
Mountd_nullrpc_timeout  Timeout(seconds) to use when probing mountd
Statd_nullrpc_timeout   Timeout(seconds) to use when probing statd
Lockd_nullrpc_timeout   Timeout(seconds) to use when probing lockd
Rpcbind_nullrpc_reboot  Boolean to indicate if we should reboot system when 
                          null rpc call on rpcbind fails
Nfsd_nullrpc_restart    Boolean to indicate if we should restart nfsd when 
                          null rpc call fails
Mountd_nullrpc_restart  Boolean to indicate if we should restart mountd when 
                          null rpc call fails
Line breaks in the Descriptions column are added to enhance the readability of this example. Actual output from the command does not contain these line breaks.

Example 13 Clearing a Start_failed Resource State by Disabling and Enabling a Resource

The Start_failed resource state indicates that a Start or Prenet_start method failed or timed out on a resource, but its resource group came online anyway. The resource group comes online even though the resource has been placed in a faulted state and might not be providing service. This state can occur if the resource's Failover_mode property is set to None or to another value that prevents the failover of the resource group.

Unlike the Stop_failed resource state, the Start_failed resource state does not prevent you or the Oracle Solaris Cluster software from performing actions on the resource group. You do not need to issue the command clear command to clear a Start_failed resource state. You only need to execute a command that restarts the resource.

The following command clears a Start_failed resource state that has occurred on the resource resource-1 by disabling and then re-enabling the resource.

# clresource disable resource-1
# clresource enable resource-1

Attributes

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

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
SUNWsczu
Interface Stability
Evolving

See Also

Intro(1CL), clreslogicalhostname(1CL), clresourcegroup(1CL), clresourcetype(1CL), clressharedaddress(1CL), cluster(1CL), scha_calls(3HA), clconfiguration(5CL), attributes(5), r_properties(5), rbac(5)

Oracle Solaris Cluster Data Services Planning and Administration Guide

Notes

The superuser can run all forms of this command.

Any user can run this command with the following options:

To run this command with subcommands, users other than superuser require RBAC authorizations. See the following table.

Subcommand
RBAC Authorization
create
solaris.cluster.modify
delete
solaris.cluster.modify
disable
solaris.cluster.admin
enable
solaris.cluster.admin
export
solaris.cluster.read
list
solaris.cluster.read
list-props
solaris.cluster.read
set
solaris.cluster.modify
monitor
solaris.cluster.admin
clear
solaris.cluster.admin
show
solaris.cluster.read
status
solaris.cluster.read
unmonitor
solaris.cluster.admin