About the main.cf file

The format of the main.cf file comprises include clauses and definitions for the cluster, systems, service groups, and resources. The main.cf file also includes service group and resource dependency clauses.

Table: Components of the main.cf file describes some of the components of the main.cf file:

Table: Components of the main.cf file

Components of main.cf file


Include clauses

Include clauses incorporate additional configuration files into main.cf. These additional files typically contain type definitions, including the types.cf file. Typically, custom agents add type definitions in their own files.

    include "types.cf"

See Including multiple .cf files in main.cf.

Cluster definition

Defines the attributes of the cluster, the cluster name and the names of the cluster users.

    cluster demo (
    UserNames = { admin = cDRpdxPmHzpS }

System definition

Lists the systems designated as part of the cluster. The system names must match the name returned by the command uname -a.

Each service group can be configured to run on a subset of systems defined in this section.

    system Server1
    system Server2

Service group definition

Service group definitions in main.cf comprise the attributes of a particular service group.

   group NFS_group1 (
        SystemList = { Server1=0, Server2=1 }
        AutoStartList = { Server1 }

Resource definition

Defines each resource that is used in a particular service group. You can add resources in any order. The utility hacf arranges the resources alphabetically the first time the configuration file is run.

   DiskGroup DG_shared1 (
        DiskGroup = shared1

Resource dependency clause

Defines a relationship between resources. A dependency is indicated by the keyword requires between two resource names.

    IP_resource requires NIC_resource

In an atleast resource dependency, the parent resource depends on a set of child resources and a minimum number of resources from this resource set are required for the parent resource to be brought online or to remain online.

    res1 requires atleast 2 from res2,

The above dependency states that res1 can be brought online or can remain online only when 2 resources from the resource set (res2, res3, res4, res5, res6) are online. The minimum number of resources required by the parent resource should be greater than or equal to 1 and less than the total number of child resources in the resource set.

Service group dependency clause

To configure a service group dependency, place the keyword requires in the service group declaration of the main.cf file. Position the dependency clause before the resource dependency specifications and after the resource declarations.

    requires group_x 
    <dependency category> 
    <dependency location>
    <dependency rigidity> 


Sample configurations for components of global clusters are listed separately.

More Information

Cluster attributes


Service group attributes

About the SystemList attribute

About resources and resource dependencies

About service group dependencies

VCS global clusters: The building blocks