/etc/ocfs2/cluster.conf(5)
β¨ /etc/ocfs2/cluster.conf β¨
okay bestie, this is the cluster configuration file for the o2cb cluster stack β and it lives at /etc/ocfs2/cluster.conf. that's it, that's the file. it's manual page section 5, so it's a file-format situation, not a command situation. π
πΈ NAME πΈ
/etc/ocfs2/cluster.conf β the Cluster configuration file for the o2cb cluster stack. lowkey the blueprint of your whole cluster. π¦
π SYNOPSIS π
so the whole cluster layout of the o2cb cluster stack gets specified in /etc/ocfs2/cluster.conf. this file lists:
- the name of the cluster
- the nodes comprising that cluster
- its heartbeat regions
the cluster stack expects this file to be the same on all nodes in that cluster β no cap, everyone has to be on the same page or it's giving chaos. π
this file should be populated using the o2cb(8) cluster configuration utility. there's a whole sample of that down in the example section, keep scrolling. π
π DESCRIPTION π
the config file is divided into three types of stanzas, and each one has a list of parameters and values. the three stanza types are:
clusternodeheartbeat
while a configuration file can store definitions of multiple clusters, the o2cb cluster stack allows only one cluster to be active at any one time. the name of this active cluster is stored in /etc/sysconfig/o2cb [ o2cb.sysconfig(5) ]. so like, you can collect them, you just can't run them all at once. one at a time, queen. π
π the cluster stanza π
this stanza specifies the name of the cluster, the number of nodes and the heartbeat mode.
the cluster name can include up to 16 alphanumeric characters [0-9A-Za-z]. no special characters are allowed. none. zero. don't try it. π
node_countβ number of nodes in the clusterheartbeat_modeβlocalorglobalheartbeatnameβ cluster name (up to 16 alphanumeric chars[0-9A-Za-z])
π¦ the node stanza π¦
this stanza specifies the node name that's part of the cluster along with its IPv4 address, port and node number.
the node name must match the hostname. the domain name is not required β for example, appserver1.company.com can just be appserver1. β¨
the IPv4 address need not be the one associated with that hostname. as in, any valid IPv4 address on that node can be used. the o2cb cluster stack will not attempt to match the node name (hostname) with the specified IPv4 address. and fr fr, a low-latency private interconnect address is recommended for best performance. ποΈ
ip_portβ IPv4 portip_addressβ IPv4 address (private interconnect recommended)numberβ node number (0 - 254)nameβ node name (hostname without the domain name)clusterβ cluster name (should match the name in theclusterstanza)
π the heartbeat stanza π
this stanza specifies the global heartbeat region UUIDs. a cluster can have up to 32 heartbeat regions. πΈ
this is an optional stanza and is only required if the global heartbeat mode is enabled. in other words, the regions are only used if heartbeat_mode = global is in the cluster stanza. if not, this stanza is ignored. she's just sitting there, unbothered, unused. π
regionβ heartbeat region UUIDclusterβ cluster name (should match the name in theclusterstanza)
π the manual-editing rules (read them, bestie) π
while manual editing is not recommended, users doing so must follow the format strictly. this is not the vibe for freestyling. π
- the stanza should start at the first column and end with a colon
- the parameters must start after a tab
- a blank line must demarcate each stanza
- care should be taken to avoid stray white-spaces
π₯ EXAMPLE π₯
the example below illustrates populating a cluster.conf with a cluster called webcluster, having 3 nodes and 3 global heartbeat regions, using the o2cb(8) utility.
$ o2cb add-cluster webcluster
$ o2cb add-node webcluster node7 --ip 192.168.0.107 --number 7
$ o2cb add-node webcluster node6 --ip 192.168.0.106 --number 6
$ o2cb add-node webcluster node10 --ip 192.168.0.110 --number 10
$ o2cb add-heartbeat webcluster /dev/sdg1
$ o2cb add-heartbeat webcluster /dev/sdk1
$ o2cb add-heartbeat webcluster /dev/sdh1
$ o2cb heartbeat-mode webcluster global
$ o2cb list-cluster webcluster
heartbeat:
region = 77D95EF51C0149D2823674FCC162CF8B
cluster = webcluster
heartbeat:
region = DCDA2845177F4D59A0F2DCD8DE507CC3
cluster = webcluster
heartbeat:
region = BBA1DBD0F73F449384CE75197D9B7098
cluster = webcluster
node:
ip_port = 7777
ip_address = 192.168.0.107
number = 7
name = node7
cluster = webcluster
node:
ip_port = 7777
ip_address = 192.168.0.106
number = 6
name = node6
cluster = webcluster
node:
ip_port = 7777
ip_address = 192.168.0.110
number = 10
name = node10
cluster = webcluster
cluster:
node_count = 3
heartbeat_mode = global
name = webcluster
look at her go. three nodes, three heartbeat regions, one cluster, zero notes. ate and left no crumbs. πβ¨
π SEE ALSO π
π«Ά AUTHORS π«Ά
Oracle Corporation
β COPYRIGHT β
Copyright Β© 2004, 2012 Oracle. All rights reserved.
k that's the whole page bestie, ily, go configure responsibly π β this was Version 1.8.9, from January 2012, brought to you by the OCFS2 Manual Pages. periodt. π β¨
π¦ where this page comes from
- fedora 44: ocfs2-tools 1.8.9-2.fc44 Β· GPL-2.0-only
- fedora 44: ocfs2-tools 1.8.9-2.fc44 Β· GPL-2.0-only
- ubuntu resolute: ocfs2-tools 1.8.9-1 Β· GPL-2.0-or-later
- ubuntu stonking: ocfs2-tools 1.8.9-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms