Cluster Layout Configuration File – OCFS2….

By default, the cluster layout configuration file for OCFS2 is /etc/ocfs2/cluster.conf. It is not necessary to configure this file when mounting an OCFS2 volume on a stand-alone, nonclustered system.


        name = mycluster

        heartbeat_mode = <local|global>

        node_count = <number of nodes in cluster>


        name = host01

        cluster = mycluster

        number = 0

        ip_address =

        ip_port = 7777


After creating this configuration file on one node in the cluster, copy the file to all nodes in the cluster. If you edit this file on any node, ensure that the other nodes are updated as well. When adding a new node to the cluster, update this configuration file on all nodes before mounting the OCFS2 file system from the new node.

The example configuration file in the slide has two sections (or stanzas):

  • Cluster – This stanza specifies the parameters for the cluster. The configuration file typically contains only one cluster stanza. It can contain multiple cluster stanzas; however, only one cluster can be active at any time.
  • Node – This stanza specifies the parameters for the individual nodes in the cluster. The configuration file typically contains multiple node stanzas.

You can use a text editor to manually create the /etc/ocfs2/cluster.conf file or use the o2cb utility to create and modify the configuration file. It is recommended that you use the o2cb command to modify the configuration file. This command ensures that entries in the configuration file are formatted correctly.

If you edit the configuration file manually, note the following guidelines:

  • The cluster: and node: headings must start in the first column and end with a colon (:).
  • Each parameter entry must be indented by one tab space.
  • A blank line must separate each stanza that defines the cluster or a node.