Go to main content

Reference for Oracle Solaris Cluster 4.4

Exit Print View

Updated: August 2018
 
 

clresourcetype (8CL)

Name

clresourcetype, clrt - manage resource types for Oracle Solaris Cluster data services

Synopsis

/usr/cluster/bin/clresourcetype [subcommand -?]
/usr/cluster/bin/clresourcetype subcommand -v [options] 
[resource-type]…
/usr/cluster/bin/clresourcetype add-node  -n node[,…] 
[-Z {zone-cluster-name | global}] {+ | resource-type}
/usr/cluster/bin/clresourcetype export [-o {- | configfile}] 
[+ | resource-type]
/usr/cluster/bin/clresourcetype list [ -n node[,…]] 
[-Z {zone-cluster-name[,…] | global | all}] [+ | resource-type…]
/usr/cluster/bin/clresourcetype list-props [-p [name,…]] 
[-Z {zone-cluster-name[,…] | global | all}] [+ | resource-type…]
/usr/cluster/bin/clresourcetype register [-i {- | clconfiguration}] 
[ {[-n node[,…]] | -N}] 
[-f rtrfile] [-p [name [+ | -]=value,]…] 
[-Z {zone-cluster-name | global}] {+ | resource-type…}
/usr/cluster/bin/clresourcetype remove-node -n node[,…] 
[-Z {zone-cluster-name | global}] 
{+ | resource-type…}
/usr/cluster/bin/clresourcetype set [-n node[,…] | -N] 
[-p [name [+| -]=value,…] 
[-Z {zone-cluster-name | global}]{+ | resource-type…}
/usr/cluster/bin/clresourcetype show [-n node[,…]] 
[-Z {zone-cluster-name[,…] | global | all}] [+ | resource-type…]
/usr/cluster/bin/clresourcetype unregister [-Z {zone-cluster-name | global}] 
{+ | resource-type…}

Description

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 use the clresourcetype command with all subcommands except export in a zone cluster.

From the global cluster only, you can also use the –Z option with all subcommands except export to specify the name of a particular zone cluster to which you want to restrict an operation. And, you can also attach the zone-cluster name to a resource name (zone-cluster-name:resource) for all subcommands except export 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.

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.

Sub Commands

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.

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

From a global-cluster node, you can use the –Z option to specify the name of a zone cluster on which to perform this operation. The –Z option is not valid when the command is run from a zone-cluster node.

This subcommand accepts the plus sign (+) as an operand to specify all resource types.

Users other than the root user require solaris.cluster.modify 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(7CL) man page.

Users other than the root user require solaris.cluster.read authorization to use this subcommand.

You can use this subcommand only in the global zone.

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 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. From a global-cluster node, you can use the –Z option to specify the name of a zone cluster on which to perform this operation. The –Z option is not valid when the command is run from a zone-cluster node.

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 the root user require solaris.cluster.read authorization to use this subcommand.

list-props

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.

From a global-cluster node, you can use the –Z option to specify the name of a zone cluster on which to perform this operation. The –Z option is not valid when the command is run from a zone-cluster node.

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 the root user require solaris.cluster.read 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.

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

From a global-cluster node, you can use the –Z option to specify the name of a zone cluster on which to perform this operation. The –Z option is not valid when the command is run from a zone-cluster node.

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 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 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

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 Oracle. These resource types must also be installed on all nodes in the node list.

Users other than the root user require solaris.cluster.modify 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.

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

From a global-cluster node, you can use the –Z option to specify the name of a zone cluster on which to perform this operation. The –Z option is not valid when the command is run from a zone-cluster node.

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 the root user require solaris.cluster.modify 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.

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

From a global-cluster node, you can use the –Z option to specify the name of a zone cluster on which to perform this operation. The –Z option is not valid when the command is run from a zone-cluster node.

You can set only resource type properties that are designated as Tunable Any Time in the rt_properties(7) 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.

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:

  • 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.

From a global-cluster node, you can use the –Z option to specify the name of a zone cluster on which to perform this operation. The –Z option is not valid when the command is run from a zone-cluster node.

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 the root user require solaris.cluster.read 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.

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

From a global-cluster node, you can use the –Z option to specify the name of a zone cluster on which to perform this operation. The –Z option is not valid when the command is run from a zone-cluster node.

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 the root user require solaris.cluster.admin 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.

–frtrfile|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:

  • 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(7CL) 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(7CL) 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 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.

–n node[,…]
–-node=node[,…]
–-node node[,…]

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.

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:

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 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(7CL) man page.

–p name=value
–p name+=array-values
–p name-=array-values
–-property=name=value
–-property=name+=array-values
–-property=name-=array-values
–-property name=value
–-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-cluster-name | global | all}
–-zonecluster={zone-cluster-name | global | all}
–-zonecluster {zone-cluster-name | global | all}

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.

The –Z option is not valid when the command is run from a zone-cluster node.

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

zone-cluster-name

Specifies that the command with which you use this option is to operate on all specified resource types in only the zone cluster named zone-cluster-name.

global

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

all

Specifies that the command with which you use this option is to operate on resource types in all zone clusters and in the global cluster.

Operands

Only the following operand is supported:

resource-type

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 type, you can use the plus sign (+) to specify all resource types.

For a description of the format of resource-type names, see Legal RGM Names in Planning and Administering Data Services for Oracle Solaris Cluster 4.4.

Exit Status

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

The following exit codes can be returned:

0 CL_NOERR

No error

The command that you issued completed successfully.

1 CL_ENOMEM

Not enough swap space

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

3 CL_EINVAL

Invalid argument

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

6 CL_EACCESS

Permission denied

The object that you specified is inaccessible. You might need the root role or authorization to issue the command. See the rbac(7) man page 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: (1) The object does not exist. (2) A directory in the path to the configuration file that you attempted to create with the –o option does not exist. (3)The configuration file that you attempted to access with the –i option contains errors.

37 CL_EOP

Operation not allowed

You tried to perform an operation on an unsupported configuration, or you performed an unsupported operation.

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 +

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
Example 7 Showing Properties of a Resource Type Version

This example lists the properties of version 8 of the SUNW.oracle_server resource type.

# clresourcetype show SUNW.oracle_server:8
    Resource Type:                                  SUNW.oracle_server:8
    RT_description:                                 Resource type for Oracle Server
    RT_version:                                     8
    API_version:                                    2
    RT_basedir:                                     /opt/SUNWscor/oracle_server
    Single_instance:                                False
    Proxy:                                          False
    Init_nodes:                                     All potential masters
    Installed_nodes:                                <All>
    Failover:                                       True
    Pkglist:                                        <NULL>
    RT_system:                                      False
    Global_zone:                                    False

Attributes

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

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
ha-cluster/system/core
Interface Stability
Evolving

See Also

clreslogicalhostname(8CL), scha_calls(3HA), clconfiguration(7CL), attributes(7), r_properties(7), rbac(7), Intro(8CL), clresource(8CL), clresourcegroup(8CL), clressharedaddress(8CL), cluster(8CL)

Resource Group Properties in Planning and Administering Data Services for Oracle Solaris Cluster 4.4

Notes

The root 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 the root role require authorizations. See the following table.

Subcommand
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