Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

clresourcetype(1cl) [opensolaris man page]

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

NAME
clresourcetype, clrt - manage resource types for Sun Cluster data services SYNOPSIS
/usr/cluster/bin/clresourcetype [subcommand -?] /usr/cluster/bin/clresourcetype -V /usr/cluster/bin/clresourcetype subcommand [options] -v [resourcetype]... /usr/cluster/bin/clresourcetype add-node [-z zone] -n node[:zone][,...] {+ | resourcetype...} /usr/cluster/bin/clresourcetype export [-o {- | configfile}] [+ | resourcetype...] /usr/cluster/bin/clresourcetype list [ [-z zone] -n node[:zone][,...]] [+ | resourcetype...] /usr/cluster/bin/clresourcetype list-props [-p [name,]...] [+ | resourcetype...] /usr/cluster/bin/clresourcetype register [-i {- | clconfiguration}] [ [-z zone] { [-n node[:zone][,...]] | -N}] [-f rtrfile] [-p [name [+ | -]=value,]...] {+ | resourcetype...} /usr/cluster/bin/clresourcetype remove-node -nnode[:zone][,...] [-z zone] {+ | resourcetype...} /usr/cluster/bin/clresourcetype set [ [-z zone] { [-n node[:zone][,...]] | -N}] [-p [name [+ | -]=value,]...] {+ | resourcetype...} /usr/cluster/bin/clresourcetype show [ [-z zone] -n node[:zone][,...]] [+ | resourcetype...] /usr/cluster/bin/clresourcetype unregister {+ | resourcetype...} DESCRIPTION
The clresourcetype command manages resource types for Sun 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 zone. You can run the subcommands list, list-props, show, and export from a non-global zone. 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. SUBCOMMANDS
The following subcommands are supported: add-node Adds the specified nodes to the node list for the resource types specified as operands to the command. Use this form of the command only in the global zone. 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. export Exports the cluster resource-type configuration in the format that is described by the clconfiguration(5CL) man page. You can use this form of the command in a non-global zone. Users other than superuser require solaris.cluster.read RBAC authorization to use this subcommand. list 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 form of the command in a non-global zone. 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. list-props Displays the resource type properties of the specified resource types. This subcommand accepts the plus sign (+) as an operand to spec- ify all resource types that are registered in the cluster. You can use this form of the command in a non-global zone. 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. register 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. Use this form of the command only in the global zone. 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: o The RTR file is typically located in the /opt/cluster/lib/rgm/rtreg directory. o 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. 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: o If you specify the -i clconfiguration option, clconfiguration defines the complete list of available resource types. o 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. remove-node 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. Use this form of the command only in the global zone. 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: o 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. o 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. set 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. Use this form of the command only in the global zone. The only resource type property that you can set is the Installed_nodes property. You can modify this property by specifying the -n nodelist option without specifying the -p option. To specify the property name explicitly, use the -p Installed_nodes=nodelist 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. Users other than superuser require solaris.cluster.modify RBAC authorization to use this subcommand. show 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: o The list of properties that is associated with each resource type o 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: o The methods that are defined for the resource type o The timeout parameters of each method You can use this form of the command in the non-global zone. This subcommand accepts the plus sign (+) as an operand to specify all resource types that are registered in the cluster. If no oper- ands are 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. unregister 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. Use this form of the command only in the global zone. 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. 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. -f rtrfile-|rtrfiledir --rtrfile=rtrfile-|rtrfiledir --rtrfile rtrfile-|rtrfiledir 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: o The RTR file is typically located in the /opt/cluster/lib/rgm/rtreg directory. o 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 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 informa- tion. For more information about the resourcetypeRTRFile element, see the clconfiguration(5CL) man page. -i {- | clconfiguration-} --input={- | clconfiguration-} --input {- | clconfiguration-} 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. -N --allnodes 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 clear- ing 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. -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. 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: add-node Adds the specified nodes to the list of nodes for which resource types are registered. list Displays only resource types that are registered for use on the specified nodes. register 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. remove-node Removes the specified nodes from the list of nodes for which resource types are registered. set Makes resource types available only on the specified nodes. show Displays information only about resource types that are registered for use on the specified nodes. -o {- | clconfiguration-} --output={- | clconfiguration-} --output {- | clconfiguration-} Specifies the location where configuration information about resource types is to be written. This location can be a file or the stan- dard 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 writ- ten in the format that is defined in the clconfiguration(5CL) man page. -p name-=value -p name-+=array-values -p name--=array-values --property=name-=value --property name-=value --property=name-+=array-values --property name-+=array-values --property=name--=array-values --property name--=array-values 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. -p name-[,...] --property=name-[,...] --property name-[,...] Specifies a list of properties for the list-props subcommand. -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 (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. -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: resourcetype 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 Sun Cluster Data Services Planning and Administration Guide for Solaris OS in Sun Cluster Data Services Planning and Administration Guide for Solaris OS. 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. 18 CL_EINTERNAL Internal error was encountered An internal error indicates a software defect or other defect. 35 CL_EIO I/O error A physical input/output error has occurred. 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. 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 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 + 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 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 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), clresource(1CL), clresourcegroup(1CL), clressharedaddress(1CL), cluster(1CL), scha_calls(3HA), clconfiguration(5CL), r_properties(5), attributes(5), rbac(5) Sun Cluster Data Services Planning and Administration Guide for Solaris OS NOTES
The superuser user 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 | +------------+---------------------------------------------------------+ |add-node | solaris.cluster.modify | +------------+---------------------------------------------------------+ |export | solaris.cluster.read | +------------+---------------------------------------------------------+ |list | solaris.cluster.read | +------------+---------------------------------------------------------+ |list-props | solaris.cluster.read | +------------+---------------------------------------------------------+ |set | solaris.cluster.modify | +------------+---------------------------------------------------------+ |register | solaris.cluster.modify | +------------+---------------------------------------------------------+ |remove-node | solaris.cluster.modify | +------------+---------------------------------------------------------+ |show | solaris.cluster.read | +------------+---------------------------------------------------------+ |unregister | solaris.cluster.admin | +------------+---------------------------------------------------------+ Sun Cluster 3.2 31 Jul 2007 clresourcetype(1CL)
Man Page