This section describes how to set up a resource type registration file.
This section covers the following topics:
The three components of a resource type name are properties that are specified in the RTR file as vendor-id, resource-type, and rt-version. The clresourcetype(8CL) command inserts the period and the colon delimiters to create the name of the resource type:
The vendor-id prefix serves to distinguish between two registration files of the same name that different companies provide. To ensure that the vendor-id is unique, use the stock symbol of the company when creating the resource type. The rt-version distinguishes between multiple registered versions (upgrades) of the same base resource type.
# scha_resource_get -O Type -R resource-name -G resource-group-name
The format of resource type names is described in Format of Resource Type Names in Planning and Administering Data Services for Oracle Solaris Cluster 4.4.
Existing resources can be upgraded at run time to a new upgrade-aware version of their resource type. However, if the new resource type version is non-upgrade-aware, you would have to delete and recreate any existing resources of that type to move them to the new version. Therefore, new resource types should always include the #$upgrade directive.
To ensure that the resource type that you are modifying is upgrade-aware, include the #$upgrade directive in the resource type's RTR file. After the #$upgrade directive, add zero or more #$upgrade_from directives for each earlier version of the resource type that you want to support.
The #$upgrade and #$upgrade_from directives must appear between the resource type property declarations and the resource declarations sections in the RTR file. See the rt_reg(5) man page.Example 1 #$upgrade_from Directive in an RTR File
#$upgrade #$upgrade_from "1.1" WHEN_OFFLINE #$upgrade_from "1.2" WHEN_OFFLINE #$upgrade_from "1.3" WHEN_OFFLINE #$upgrade_from "2.0" WHEN_UNMONITORED #$upgrade_from "2.1" ANYTIME #$upgrade_from "" WHEN_UNMANAGED
The format of the #$upgrade_from directive is as follows:
#$upgrade_from version tunability
Use when there are no restrictions on when the cluster administrator can upgrade the resource. The resource can be completely online during the upgrade.
Use when the new resource type version's methods are as follows:
The Update, Stop, Monitor_check, and Postnet_stop methods are compatible with the older resource type version's starting methods (Prenet_stop and Start)
The Fini method is compatible with the Init method of older versions
The cluster administrator must only stop the resource monitor program before upgrading.
Use when the new resource type version's Update, Stop, Monitor_check, or Postnet_stop method is as follows:
Compatible with the Init method of an older version
Incompatible with an older resource type version's starting methods (Prenet_stop and Start)
The cluster administrator must take the resource offline before upgrading.
Similar to WHEN_OFFLINE. However, the cluster administrator must disable the resource before upgrading.
Use when the new resource type version's Fini method is incompatible with the Init method of an older version. The cluster administrator must switch the existing resource group to the unmanaged state before upgrading.
Use to prevent existing resources from being upgraded to the new version of the resource type. The cluster administrator must delete and recreate a resource.
You only need to change the RT_version property in an RTR file whenever the contents of the RTR file change. Choose a value for this property that clearly indicates that this version of the resource type is the latest version.
Question mark (?)
Left square bracket ([)
Right square bracket (])
The RT_version property is required.