The cluster administrator cannot configure the resource type properties that you declare in the RTR file. They become part of the permanent configuration of the resource type.
Only a cluster administrator can configure the resource type property Installed_nodes. You cannot declare Installed_nodes in the RTR file.
The syntax of resource type declarations is as follows:
property-name = value;
Property names for resource groups, resources, and resource types are not case sensitive. You can use any combination of uppercase and lowercase letters when you specify property names.
These are resource type declarations in the RTR file for a sample (smpl) data service:
# Sun Cluster Data Services Builder template version 1.0 # Registration information and resources for smpl # #NOTE: Keywords are case insensitive, i.e., you can use #any capitalization style you prefer. # Resource_type = "smpl"; Vendor_id = SUNW; RT_description = "Sample Service on Sun Cluster"; RT_version ="1.0"; API_version = 2; Failover = TRUE; Init_nodes = RG_PRIMARIES; RT_basedir=/opt/SUNWsmpl/bin; Start = smpl_svc_start; Stop = smpl_svc_stop; Validate = smpl_validate; Update = smpl_update; Monitor_start = smpl_monitor_start; Monitor_stop = smpl_monitor_stop; Monitor_check = smpl_monitor_check;
You must declare the Resource_type property as the first entry in the RTR file. Otherwise, registration of the resource type fails.
The first set of resource type declarations provide basic information about the resource type.
Provide a name for the resource type. You can specify the resource type name with the Resource_type property alone (smpl) or by using the Vendor_id property as a prefix with a period (.) separating it from the resource type (SUNW.smpl), as shown in the sample. If you use Vendor_id, make it the stock market symbol of the company that is defining the resource type. The resource type name must be unique in the cluster.
By convention, the resource type name (vendoridApplicationname) is used as the package name. Starting with the Solaris 9 OS, the combination of vendor ID and application name can exceed nine characters.
Agent Builder, on the other hand, in all cases explicitly generates the package name from the resource type name, so it enforces the nine-character limit.
Briefly describes the resource type.
Identifies the version of the sample data service.
Identifies the version of the API. For example, API_version = 2 indicates that the data service can be installed on any version of Sun Cluster starting with Sun Cluster 3.0. API_version = 7 indicates that the data service can be installed on any version of Sun Cluster starting with Sun Cluster 3.2. However, API_version = 7 also indicates that the data service cannot be installed on any version of Sun Cluster that was released before Sun Cluster 3.2. This property is described in more detail under the entry for API_version in Resource Type Properties.
Indicates that the data service cannot run in a resource group that can be online on multiple nodes at the same time. In other words, this declaration specifies a failover data service. This property is described in more detail under the entry for Failover in Resource Type Properties.
Provide the paths to the respective callback method programs that are called by the RGM. These paths are relative to the directory that is specified by RT_basedir.
The remaining resource type declarations provide configuration information.
Specifies that the RGM call the Init, Boot, Fini, and Validate methods only on nodes that can master the data service. The nodes that are specified by RG_PRIMARIES are a subset of all nodes on which the data service is installed. Set the value to RT_INSTALLED_NODES to specify that the RGM call these methods on all nodes on which the data service is installed.
Points to /opt/SUNWsample/bin as the directory path to complete relative paths, such as callback method paths.
Provide the paths to the respective callback method programs that are called by the RGM. These paths are relative to the directory that is specified by RT_basedir.
You (and the cluster administrator) can register a resource type for use in a particular zone cluster by creating an RTR file under the zone root path. To correctly configure this RTR file, ensure that it meets the following conditions:
The Global_zone property is either set to FALSE or not set at all in the RTR file. If you do not specify the Global_zone property, the property is set to FALSE by default.
The RTR file is not of the logical hostname or shared address type.
You can also register a resource type for a zone cluster by placing an RTR file in the /usr/cluster/lib/rgm/rtreg/ directory. The cluster administrator cannot configure the resource type properties that you declare in an RTR file in this directory.
Resource types that are defined in RTR files in the /opt/cluster/lib/rgm/rtreg/ directory are for the exclusive use of the global cluster.