o2cluster(8)
π o2cluster β the OCFS2 cluster-stack glow-up tool π
okay bestie, so o2cluster lives in the OCFS2 manual pages (section 8, system admin girlies rise up β¨). It's the little utility that changes the cluster stack stamped on an OCFS2 file system. Iconic. Let's get into it π¦
β¨ SYNOPSIS β¨
o2cluster [-o|--show-ondisk] [-r|--show-running]
[-u|--update[=<clusterstack>]] [-hvVyn] [device]
πΈ DESCRIPTION πΈ
So o2cluster is used to change the cluster stack stamped on an OCFS2 file system. It also used to list the active cluster stack and the one stamped on-disk. Lowkey a dual-threat. π
This utility does not expect the cluster to be online. It only updates the file system if it is reasonably assured that it is not in-use on any other node. Clean journals implies the file system is not in-use. This utility aborts if it detects even one dirty journal. One. Singular. Not a vibe. π
Before using this utility, the user should use other means to ensure that the volume is not in-use, and more importantly, not about to be put in-use. While clean journals implies the file system is not in-use, there is a tiny window after the check and before the update during which another node could mount the file system using the older cluster stack. A tiny window!! It's giving race condition energy π
If a dirty journal is detected, it implies one of two scenarios. Either:
- the file system is mounted on another node, or
- the last node to have it mounted, crashed.
There is no way, short of joining the cluster, that the utility can use to differentiate between the two. Considering this utility is targeted to be used in scenarios when the user is looking to change the on-disk cluster stack, it becomes a chicken-and-egg problem. Not the chicken-and-egg problem being cute β the actual problem. π
If one were to run into this scenario, the user should manually re-confirm that the file system is not in-use on another node and then run fsck.ocfs2(8). It will update the on-disk cluster stack to the active cluster stack, and, do a complete file system check. Slay, fsck handles it. π
π SPECIFYING CLUSTER STACK π
The cluster stack can be specified in one of two forms, bestie:
- The first as
default, denoting the original classico2cbcluster stack with local heartbeat. - The second as a triplet with the stack name, the cluster name and the cluster flags separated by commas. Like
o2cb,mycluster,global.
The valid stack names are o2cb, pcmk, and cman.
The cluster name can be up to 16 characters. The o2cb stack further restricts the names to contain only alphanumeric characters. Keep it alphanumeric and under 16, no funny business. π
The valid flags for the o2cb stack are local and global, denoting the two heartbeat modes. The only valid flag for the other stacks is none.
π OPTIONS π
-o,--show-ondiskβ Shows the cluster stack stamped on-disk. π-r,--show-runningβ Shows the active cluster stack. The one that's currently doing the most.-u,--update[=<clusterstack>]β Updates the on-disk cluster stack with the one provided. If no cluster stack is provided, the utility detects the active cluster stack and stamps it on-disk. Auto-detect mode, periodt.-v,--verboseβ Verbose mode. She talks more. π£οΈ-V,--versionβ Show version and exit. Byeee. π«Ά-y,--yesβ Always answer Yes in interactive command line.-n,--noβ Always answer No in interactive command line.
π EXAMPLES π
Showing the active stack:
# o2cluster -r
o2cb,myactivecluster,global
Showing what's stamped on a device:
# o2cluster -o /dev/sda1
o2cb,mycluster,global
And the actual glow-up update:
# o2cluster --update=o2cb,yourcluster,global /dev/sdb1
Changing the clusterstack from o2cb,mycluster,global to o2cb,yourcluster,global. Continue? y
Updated successfully.
She said "Updated successfully." and meant it. π₯
π SEE ALSO π
debugfs.ocfs2(8) fsck.ocfs2(8) fsck.ocfs2.checks(8) mkfs.ocfs2(8) mount.ocfs2(8) mounted.ocfs2(8) o2image(8) o2info(1) tunefs.ocfs2(8)
Go read those too, the whole family is iconic. π§
π AUTHORS π
Oracle Corporation
β COPYRIGHT β
Copyright Β© 2011, 2012 Oracle. All rights reserved.
and that's the whole page bestie!! this is Version 1.8.9, dated January 2012 β yes she's been that girl since 2012, no cap. stay safe out there, check those journals, and don't update a mounted file system. mwah ππβ¨
π¦ 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