Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

clresource(1cl) [opensolaris man page]

clresource(1CL) 					 Sun Cluster Maintenance Commands					   clresource(1CL)

NAME
clresource, clrs - manage resources for Sun 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][,...]] {+ | 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] 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,]...] {+ | resource...} /usr/cluster/bin/clresource disable [-r] [-g [resourcegroup,]...] [-t [resourcetype,]...] [ [-z zone] -n node[:zone][,...]] {+ | resource...} /usr/cluster/bin/clresource enable [-r] [-g [resourcegroup,]...] [-t [resourcetype,]...] [ [-z zone] -n node[:zone][,...]] {+ | resource...} /usr/cluster/bin/clresource export [-o {- | configfile}] [+ | resource...] /usr/cluster/bin/clresource list [-g [resourcegroup,]...] [-t [resourcetype,]...] [ [ [-z zone] -n node[:zone][,...]]] [+ | 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,...}]",...] [+ | resource...] /usr/cluster/bin/clresource monitor [-g [resourcegroup,]...] [-t [resourcetype,]...] [ [-z zone] -n node[:zone][,...]] {+ | 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] {+ | 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,...}]",...] [+ | resource...] /usr/cluster/bin/clresource status [-g [resourcegroup,]...] [-s [state,]...] [-t [resourcetype,]...] [ [-z zone] -n node[:zone][,...]] [+ | resource...] /usr/cluster/bin/clresource unmonitor [-g [resourcegroup,]...] [-t [resourcetype,]...] [ [-z zone] -n node[:zone][,...]] {+ | resource...} DESCRIPTION
The clresource command manages resources for Sun 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. Operation in Zones You can use the clresource command with all subcommands in the global zone. When in a non-global zone, the following restrictions apply: o The export, list, list-props, show, and status subcommands are unrestricted. o The clear, disable, enable, monitor, set, and unmonitor subcommands can operate on resources that can be mastered by the non- global zone. o The create and delete subcommands can operate on resources that can be mastered by the non-global zone and that have the prop- erty Global_zone=FALSE. For ease of administration, you might prefer to run all forms of the command in the global zone. 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: o Online o Offline o Start_failed o Stop_failed o Monitor_failed o Online_not_monitored o Starting o Stopping o 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. 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. 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. When 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. 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 prop- erty 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. 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 resource- group. -t resourcetype Deletes only the resources in the list of operands that are instances of the resource types in resource- type. By default, a resource is deleted only if the following conditions are met: o The resource must be disabled. o 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: o All specified resources are deleted, even resources that are not disabled. o 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 prop- erty 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 spec- ify that all resources are disabled. 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 resource- group. -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 resource- type. 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 moni- tored 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 disre- gards 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. 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 resource- group. -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 resource- type. 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 speci- fied 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. 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. 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 resource- group. -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. 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. 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. Exam- ples 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 sup- plied, properties of all resources in the specified resource groups or that are instances of the specified resource types are dis- played. Users other than superuser require solaris.cluster.read RBAC authorization to use this subcommand. 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. 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. If monitoring is turned on for a resource, the resource is monitored only if the following conditions are met: o The resource is enabled. o 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. 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}" 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. 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. 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. Exam- ples 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 dis- played. 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 can- not 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. 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 oper- ands 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. If you turn off monitoring for a resource that is disabled, the resource is not affected. The resource and its monitor are already off- line. 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. 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 (clcon- figuration(5CL)): o Registering resource types o Creating resource groups o 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: o Enable the resource types to be registered o Enable the resource groups to be created o 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 pro- vide 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 sub- command. 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: o All specified resources are deleted, even resources that are not disabled. o 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 infor- mation, 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. 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. 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 spec- ified 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 spec- ified 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 out- put 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 opera- tor only for properties that accept lists of string values, for example Node. -= 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 Node. 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_proper- ties(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: o Online o Offline o Start_failed o Stop_failed o Monitor_failed o Online_not_monitored o Starting o Stopping o 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 qual- ifications: o The resources are in the list of operands. o 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 RGM Legal Names in Sun Cluster Data Services Planning and Administration Guide for Solaris OS in Sun Cluster Data Services Planning and Administration Guide for Solaris OS. -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 spec- ify 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 opera- tor only for properties that accept lists of string values, for example Node. -= 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 Node. 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_proper- ties(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 opera- tor only for properties that accept lists of string values, for example Node. -= 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 Node. 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. 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 pro- cesses 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: o The validate method failed when you tried to create a resource or modify the properties of a resource. o 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: o The object does not exist. o A directory in the path to the configuration file that you attempted to create with the -o option does not exist. o 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 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: o On node phys-schost-1 and node phys-schost-2, this property is set to myora1. o On node phys-schost-3, this property is set to myora2. 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 Sun 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) Sun Cluster Data Services Planning and Administration Guide for Solaris OS NOTES
The superuser can run all forms of this command. Any user can run this command with the following options: o -? option o -V option 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 | +-----------+---------------------------------------------------------+ Sun Cluster 3.2 31 Jul 2007 clresource(1CL)
Man Page