- manage resource types for Oracle Solaris Cluster data services
/usr/cluster/bin/clresourcetype [subcommand -?]
/usr/cluster/bin/clresourcetype subcommand -v [options] [resourcetype]...
/usr/cluster/bin/clresourcetype add-node [-z zone] -n node[:zone][,…] [-Z {zoneclustername | global}] {+ | resourcetype}
/usr/cluster/bin/clresourcetype export [-o {- | configfile}] [+ | resourcetype]
/usr/cluster/bin/clresourcetype list [ [-z zone] -n node[:zone][,…]] [-Z {zoneclustername[,...] | global | all}] [+ | resourcetype...]
/usr/cluster/bin/clresourcetype list-props [-p [name,...]] [-Z {zoneclustername[,...] | global | all}] [+ | resourcetype...]
/usr/cluster/bin/clresourcetype register [-i {- | clconfiguration}] [ [-z zone] { [-n node[:zone][,…]] | -N}] [-f rtrfile] [-p [name [+ | -]=value,]...] [-Z {zoneclustername | global}] {+ | resourcetype...}
/usr/cluster/bin/clresourcetype remove-node -n node[:zone][,…] [-z zone] [-Z {zoneclustername | global}] {+ | resourcetype...}
/usr/cluster/bin/clresourcetype set [-n node[:zone][,…] | -N] [-p [name [+| -]=value,...] [-z zone] [-Z {zoneclustername | global}]{+ | resourcetype...}
/usr/cluster/bin/clresourcetype show [ [-z zone] -n node[:zone][,…]] [-Z {zoneclustername[,...] | global | all}] [+ | resourcetype...]
/usr/cluster/bin/clresourcetype unregister [-Z {zoneclustername | global}] {+ | resourcetype...}
The clresourcetype command manages resource types for Oracle Solaris Cluster data services. The clrt command is the short form of the clresourcetype command. The clresourcetype command and the clrt command are identical. You can use either form of the command.
For ease of administration, run this command from the global-cluster node. You can run the subcommands list, list-props, show, and export from a non-global zone.
You can use the clresourcetype 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-type name (zoneclustername : resourcetype) 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.
The general form of this command is as follows:
clresourcetype [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.
The following subcommands are supported:
Adds the specified nodes to the node list for the resource types specified as operands to the command.
You can use this subcommand in the global cluster or in a zone cluster.
While using the add-node command from the global-cluster node, you can use the -Z option to specify the name of the zone cluster. If you are using the -Z option, you cannot specify nodes in the node:zone format.
This subcommand accepts the plus sign (+) as an operand to specify all resource types.
Users other than superuser require solaris.cluster.modify role-based access control (RBAC) authorization to use this subcommand.
See also the description of the remove-node subcommand.
Exports the cluster resource-type 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.
You can use this subcommand only in the global cluster.
Displays a list of the resource types that are specified as operands to the command. By default, all resource types that are registered in the cluster are displayed. This subcommand accepts the plus sign (+) as an operand to specify all resource types that are registered in the cluster.
You can use this subcommand in the global cluster or in a zone cluster.
In the global-cluster node, this subcommand displays only the resource types registered in the global-cluster node. To view the resource types registered in a zone cluster from the global cluster, you can use the -Z option to specify the zone cluster.
If you specify the -n nodelist option, only resource types that are registered for use on the nodes in nodelist are displayed.
If you specify the -v option, the node list of each resource type in the list is also displayed.
Users other than superuser require solaris.cluster.read RBAC authorization to use this subcommand.
Displays the properties of the specified resource types. This subcommand accepts the plus sign (+) as an operand to specify all resource types that are registered in the cluster.
You can use this subcommand in the global cluster or in a zone cluster.
To view the resource-type properties registered in a zone cluster from the global cluster, you can use the -Z option to specify the zone cluster.
The -p option limits the set of properties that are to be displayed.
If you specify the -v option, the description of each property is also displayed.
Users other than superuser require solaris.cluster.read RBAC authorization to use this subcommand.
Registers the resource types that are specified as operands to the command. A resource type must be registered before a resource of that type can be created.
You can use this subcommand in the global cluster or in a zone cluster.
To register resource types with a zone cluster from the global cluster, specify the zone-cluster name using the -Z option.
The data service that defines each resource type must be installed on each node where the resource type is to be available. If the data service is installed on only a subset of cluster nodes, use the -n nodelist option to specify the subset of nodes. If the resource type is to be available on all nodes in the cluster, specify the -N option. When you use the -N option, the resource type is also available to any nodes that might be added to the cluster in the future. Omitting both the -N option and the -n nodelist option is equivalent to specifying the -N option. To specify the property name explicitly, use the -p Installed_nodes=nodelist option.
Information about a resource type that is registered with the cluster is obtained from the resource type registration (RTR) file that defines the resource type. The location and name of the RTR file typically follow these conventions:
The RTR file is typically located in the /opt/cluster/lib/rgm/rtreg directory.
The name of the RTR file typically matches the name of the resource type.
The location and file name of all RTR files that are supplied by Sun Microsystems, Inc. follow these conventions. For example, the RTR file that defines the SUNW.nfs resource type is contained in the file /opt/cluster/lib/rgm/rtreg/SUNW.nfs.
If an RTR file does not follow these conventions, you must specify the -f rtrfile option.
These conventions are also applicable for the resource types registered from a zone cluster. When a user registers a resource type for a zone cluster, the RTR file must reside inside the zone cluster zonepath. You cannot register a RTR file outside the zone cluster zonepath boundary. While registering a resource type with Global_zone property set to TRUE for a zone cluster, the RTR file must reside inside the global-cluster node in/opt/cluster/lib/rgm/rtreg or /usr/cluster/lib/rgm/rtreg directory. If you specify any location outside of these locations, the resource type fails to register.
Caution - Do not register a resource type for which the Global_zone property is set to TRUE unless the resource type comes from a known and trusted source. Resource types for which this property is set to TRUE circumvent zone isolation and present a risk. |
This subcommand accepts the plus sign (+) as an operand to specify all resource types that are not already registered. The complete list of available resource types is determined as follows:
If you specify the -i clconfiguration option, clconfiguration defines the complete list of available resource types.
If you do not specify the -i option, the complete list of available resource types contains only resource types that are supplied by Sun Microsystems, Inc. These resource types must also be installed on all nodes in the node list.
Users other than superuser require solaris.cluster.modify RBAC authorization to use this subcommand.
See also the description of the unregister subcommand.
Removes a node from the list of nodes for which the resource types in the operand list are registered. This subcommand accepts the plus sign (+) as an operand to specify all resource types that are registered in the cluster.
You can use this subcommand in the global cluster or in a zone cluster.
To remove resource types with a zone cluster from the global cluster, specify the zone-cluster name using the -Z option
You can use this subcommand only on resource types that have already been registered for some nodes, but not all nodes, in a cluster. Consequently, an error occurs if you use this subcommand in the following situations:
A resource type in the list of operands has already been registered for all nodes in a cluster. For information about the registration of resource types for all nodes in a cluster, see the description of the -N option.
The Installed_nodes property of a resource type in the list of operands does not already specify a subset of the nodes in the cluster.
Users other than superuser require solaris.cluster.modify RBAC authorization to use this subcommand.
See also the description of the add-node subcommand.
Sets properties of the resource types that are specified as operands to the command. This subcommand accepts the plus sign (+) as an operand to specify all resource types that are registered in the cluster.
You can use this subcommand in the global cluster or in a zone cluster.
To set the properties of resource types in a zone cluster from the global cluster, specify the zone-cluster name using the -Z option.
You can set only resource type properties that are designated as Tunable Any Time in the rt_properties(5) man page.
You can modify the Installed_Nodes property by specifying the -n nodelist option without specifying the -p option. Or, you can specify the property name explicitly by using the -p Installed_Nodes=nodelist option.
For all other properties that are designated as Tunable Any Time, you must specify the property name explicitly by using the -p property = value option.
To limit the list of nodes on which the resource type is to be available, specify the -n nodelist option. Conversely, to specify that the resource type is to be available on all nodes in the cluster, specify the -N option. When you use the -N option, the resource type is also available to any nodes that might be added to the cluster in the future. You must specify the -n option or the -N option. If you omit both options, the subcommand does not change any configuration information.
Displays information about resource types that are registered in the cluster. By default, the following information for all resource types that are registered is displayed:
The list of properties that is associated with each resource type
Parameters that define these properties
If you specify the -n nodelist option, only resource types that are registered for use on nodes in nodelist are displayed.
If you specify the -v option, the following information is also displayed for each resource type:
The methods that are defined for the resource type
The timeout parameters of each method
You can use this subcommand in the global cluster or in a zone cluster.
To view the resource types registered in a zone cluster from the global cluster, you can specify the zone-cluster name using the -Z option.
This subcommand accepts the plus sign (+) as an operand to specify all resource types that are registered in the cluster. If operands are not supplied, information about all resource types that are registered in the cluster is displayed.
Users other than superuser require solaris.cluster.read RBAC authorization to use this subcommand.
Unregisters the resource types that are specified as operands to the command. This subcommand accepts the plus sign (+) as an operand to specify all registered resource types for which no instances of the type exist.
You can use this subcommand in the global cluster or in a zone cluster.
To unregister resource types with a zone cluster from the global cluster, specify the zone-cluster name using the -Z option.
Unregister a resource type before uninstalling the data service that defines the resource type.
If a resource of a certain resource type exists, you cannot unregister the resource type.
Users other than superuser require solaris.cluster.admin RBAC authorization to use this subcommand.
See also the description of the register subcommand.
The following options are supported:
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.
Specifies the full path to an RTR file or a directory that contains RTR files for use in registering resource types. You can specify this option only with the register subcommand.
If you specify a file, you can register only one resource type.
You need to specify this option only if an RTR file that you are using does not follow these conventions:
The RTR file is typically located in the /opt/cluster/lib/rgm/rtreg directory.
The name of the RTR file typically matches the name of the resource type.
The location and file name of all RTR files that are supplied by Oracle follow these conventions. For example, the RTR file that defines the SUNW.nfs resource type is contained in the file /opt/cluster/lib/rgm/rtreg/SUNW.nfs.
If you use the -i option, you can specify a resourcetypeRTRFile element in the configuration information for any resource type that is specified in the configuration information. The resourcetypeRTRFile element specifies the RTR file that is to be used for registering the resource type. However, the export subcommand does not include the resourcetypeRTRFile element in generated configuration information. For more information about the resourcetypeRTRFile element, see the clconfiguration(5CL) man page.
Specifies configuration information that is to be used for registering resource types or for modifying the node lists of registered resource types. 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 (stdin). To specify the standard input, specify - instead of a file name.
Only the resource types that are supplied as operands to the command are affected by this option. Options that are specified in the command override any options that are set in the clconfiguration file. If configuration parameters are missing in the clconfiguration file, you must specify these parameters at the command line.
Specifies that the resource types in the list of operands are to be available on all nodes in the cluster. The -N option also makes these resource types available to any nodes that might be added to the cluster in the future. The option achieves this result by clearing the Installed_nodes property.
If you specify the -N option, you cannot specify the -n option in the same command.
You can specify the -N option only with the register subcommand or the set subcommand.
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.
If you specify the -n option, you cannot specify the -N option in the same command.
The subcommands with which you can specify this option are as follows:
Adds the specified nodes to the list of nodes for which resource types are registered.
Displays only resource types that are registered for use on the specified nodes.
Registers resource types only for use on the specified nodes. If you omit the -n option, the register subcommand registers resource types for use on all nodes. The subcommand also registers the resource types for any nodes that are added to the cluster in the future.
Removes the specified nodes from the list of nodes for which resource types are registered.
Makes resource types available only on the specified nodes.
Displays information only about resource types that are registered for use on the specified nodes.
Specifies the location where configuration information about resource types is to be written. This location can be a file or the standard output (stdout). To specify the standard output, specify - 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 resource types that are supplied as operands to the command. The information is written in the format that is defined in the clconfiguration(5CL) man page.
Sets the value of a property for resource types that are supplied as operands to the command.
The operators to use with this option are as follows:
Sets the property to the specified value.
Adds a value or values to a string array value. You can specify this operator only for properties that accept lists of string values, for example Installed_nodes.
Removes a value or values from a string array value. You can specify this operator only for properties that accept lists of string values, for example Installed_nodes
Using the option -p Installed_nodes+=nodeC,nodeD with the set subcommand is identical to using the option -n nodeC,nodeD with the add-node subcommand.
Specifies a list of properties for the list-props subcommand.
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.
Displays verbose messages to the standard output (stdout).
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.
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.
Specifies the cluster or clusters in which the resource type is registered and 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:
Specifies that the command with which you use this option is to operate on all specified resource types in only the zone cluster named zoneclustername.
Specifies that the command with which you use this option is to operate on all specified resource types in the global cluster only.
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 resource types 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 resource types in that zone cluster only.
Only the following operand is supported:
Specifies the resource type that is to be managed or the resource types that are to be managed. If the subcommand accepts more than one resource, you can use the plus sign (+) to specify all resource types.
For a description of the format of resource-type names, see RGM Legal Names in Oracle Solaris Cluster Data Services Planning and Administration Guide.
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:
No error
The command that you issued completed successfully.
Not enough swap space
A cluster node ran out of swap memory or ran out of other operating system resources.
Invalid argument
You typed the command incorrectly, or the syntax of the cluster configuration information that you supplied with the -i option was incorrect.
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.
Internal error was encountered
An internal error indicates a software defect or other defect.
I/O error
A physical input/output error has occurred.
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.
Operation not allowed
You tried to perform an operation on an unsupported configuration, or you performed an unsupported operation.
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.
Example 1 Registering Resource Types
This example registers all resource types whose data services are installed on all nodes and that are not yet registered. The command runs in concise mode.
# clresourcetype register +
Example 2 Registering Resource Types on Selected Nodes
This example registers all resource types whose data services are installed on node phys-schost-1 and node phys-schost-2 and that are not yet registered . The resources are to be made available only on these nodes. In this example, the command returns no error. The command runs in verbose mode.
# clresourcetype register -v -n phys-schost-1,phys-schost-2 +
The following command registers all resource types whose data services are installed on zone cluster nodes zc-host-1 and zc-host-2 of zone cluster ZC and that are not registered. The resources are available only on these zone cluster nodes.
#.clresourcetype register -n zc-host-1,zc-host-2 -Z ZC +
Example 3 Registering a Single Resource Type
This example registers the SUNW.nfs:3.2 resource type. The data service for this resource type is installed on all cluster nodes.
# clresourcetype register nfs:3.2
Example 4 Listing Resource Types
This example lists only the names of all registered resource types.
# clresourcetype list SUNW.LogicalHostname SUNW.SharedAddress SUNW.nfs SUNW.apache
Example 5 Listing Resource Types With Their Node Lists
This example lists all registered resource types with their node lists.
# clresourcetype list -v Resource Type Node List ------------- --------- SUNW.LogicalHostname <all> SUNW.SharedAddress <all> SUNW.nfs phys-schost-1,phys-schost-2,phys-schost-3 SUNW.apache phys-schost-1,phys-schost-2,phys-schost-3
When you execute the following command from the global-cluster node, the command lists all registered resource types in zone cluster ZC.
#.clresourcetype list -Z ZC SUNW.nfs SUNW.apache
Example 6 Listing Resource Types on Specified Nodes
This example lists all resource types that are registered on phys-schost-4.
# clrt list -n phys-schost-4 SUNW.LogicalHostname SUNW.SharedAddress
See attributes(5) for descriptions of the following attributes:
|
Intro(1CL), clreslogicalhostname(1CL), clresource(1CL), clresourcegroup(1CL), clressharedaddress(1CL), cluster(1CL), scha_calls(3HA), clconfiguration(5CL), r_properties(5), attributes(5), rbac(5)
Oracle Solaris Cluster Data Services Planning and Administration Guide
The superuser user can run all forms of this command.
Any user can run this command with the following options:
-? option
-V option
To run this command with subcommands, users other than superuser require RBAC authorizations. See the following table.
|