< Previous | Next > | |
Product: Cluster Server Guides | |
Manual: Cluster Server 4.1 User's Guide |
The types.cf FileThe types.cf file describes standard resource types to the VCS engine; specifically, the data required to control a specific resource. The following example illustrates a DiskGroup resource type definition. type DiskGroup ( static int NumThreads = 1 static int OnlineRetryLimit = 1 static str ArgList[] = { DiskGroup, StartVolumes, StopVolumes, MonitorOnly } NameRule = resource.DiskGroup str DiskGroup str StartVolumes = 1 str StopVolumes = 1 ) The types definition performs two important functions. First, it defines the type of values that may be set for each attribute. In the DiskGroup example, the NumThreads and OnlineRetryLimit attributes are both classified as int, or integer. The DiskGroup, StartVolumes and StopVolumes attributes are defined as str, or strings. See Attribute Data Types for more information. The second critical piece of information provided by the type definition is the ArgList attribute. The line static str ArgList[] = { xxx, yyy, zzz } defines the order in which parameters are passed to the agents for starting, stopping, and monitoring resources. For example, when VCS wants to bring the disk group shared_dg1 online, it passes the following arguments to the online command for the DiskGroup agent: shared_dg1 1 1 <null> The sequence of arguments indicates the online command, the name of the resource, then the contents of the ArgList. Since MonitorOnly is not set, it is passed as a null. This is always the order: command, resource name, ArgList. For another example, review the following main.cf and types.cf representing an IP resource: IP nfs_ip1 ( Device = lan0 Address = "192.168.1.201" ) type IP ( static str ArgList[] = { Device, Address, NetMask, Options, ArpDelay, IfconfigTwice } NameRule = IP_ + resource.Address str Device str Address str NetMask str Options int ArpDelay = 1 int IfconfigTwice ) The high-availability address is configured on the interface defined by the Device attribute. The IP address is enclosed in double quotes because the string contains periods. See Attribute Data Types. The VCS engine passes the identical arguments to the IP agent for online, offline, clean and monitor. It is up to the agent to use the arguments it requires. All resource names must be unique in a VCS cluster. |
^ Return to Top | < Previous | Next > |
Product: Cluster Server Guides | |
Manual: Cluster Server 4.1 User's Guide | |
VERITAS Software Corporation
www.veritas.com |