/etc/ocfs2/cluster.conf(5)

πŸ“¦
version 1.8.9 Β· 3 versions
, in fedora 44, ubuntu resolute, ubuntu stonking

✨ /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:

  1. cluster
  2. node
  3. heartbeat

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 cluster
  • heartbeat_mode β€” local or global heartbeat
  • name β€” 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 port
  • ip_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 the cluster stanza)

πŸ’œ 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 UUID
  • cluster β€” cluster name (should match the name in the cluster stanza)

πŸŽ€ 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 Β© 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