o2info(1)
π o2info β hey bestie, let's peek at your OCFS2 filesystem π
o2info(1) β part of the OCFS2 Manual Pages glow-up. Sit down, grab a boba, we're reading filesystem tea leaves. π¦
β¨ NAME β¨
o2info β show OCFS2 file system information. That's it, that's the whole job, and she does it flawlessly. π
π SYNOPSIS π
o2info [-C|--cluster-coherent] [--fs-features] [--volinfo] [--mkfs]
[--freeinode] [--freefrag chunksize] [--space-usage] [--filestat]
<device or file>
πΈ DESCRIPTION πΈ
Okay so real talk: o2info shows you information about OCFS2 file systems. And the way she's different from debugfs.ocfs2(8)? Iconic behaviour, honestly. She lets users with limited read privileges query basically the same info. You do not need read privilege on the device itself, which is what debugfs.ocfs2(8) expects from you. Rude of it, but okay.
Instead, this utility lets you hand over a path to an object on a mounted file system. And for that, bestie, you just need the read privilege on that object. That's the whole vibe check. β
β¨ OPTIONS β¨
-C,--cluster-coherentβ Force cluster coherency when you're querying a mounted file system. It's disabled by default. Only turn this on if you genuinely need accurate info, because it involves taking cluster locks. So like... know what you're doing. π--fs-featuresβ Show all the file system features enabled on the file system (compat, incompat, ro compat). The full receipt. π§Ύ--volinfoβ Show file system information like label, uuid, block and cluster sizes, node slots, etc. The classic. The main character. π--mkfsβ Show file system information inmkfs.ocfs2(8)format.--freeinodeβ Show the inode (allocated/free) count for all slots in the file system. Every single one. No skipping. π--freefragchunksize β Show the free space fragmentation of the file system. Heads up: the chunksize should be equal to or greater than the cluster size, no cap. π--space-usageβ Show the disk space used by a file in block sized units. It also gives you the block count of the holes, shared extents and unwritten extents. Very thorough of her. π--filestatβ Show the extendedstat(1)information. That includes the number of clusters consumed by extended attributes, unwritten extents, shared extents and holes, plus the file fragmentation score. It's giving full report card. π-V,--versionβ Show version and exit. Bye bestie. π-h,--helpβ Show help and exit. Also bye bestie, but helpful. π«Ά
β οΈ NOTE β οΈ
The utility uses custom info ioctls to query information from a mounted file system. And because these info ioctls were only added starting in Linux kernel 2.6.37, this utility will not work on mounted OCFS2 file systems running on systems with older kernels. So if your kernel is ancient, she simply cannot serve. Sorry babe. π
π EXAMPLES π
Non-privileged users can query the volume information by providing the path to a file on a mounted file system. Priviledged users can provide the path to the device. Both valid, both slay. π
# o2info --volinfo /ocfs2/testfile
Label: webhome
UUID: 8AB016CD59FC4327A2CDAB69F08518E3
Block Size: 4096
Cluster Size: 131072
Node Slots: 8
Features: backup-super strict-journal-super sparse extended-slotmap
Features: inline-data xattr indexed-dirs refcount discontig-bg clusterinfo
Features: unwritten
The same goes for querying file system fragmentation. Look at this histogram, she's beautiful. π
# o2info --freefrag 128 /ocfs2/testfile
Blocksize: 4096 bytes
Clustersize: 131072 bytes
Total clusters: 409599
Free clusters: 376537 (91.92%)
Min. free extent: 256 KB
Max. free extent: 4091648 KB
Avg. free extent: 172672 KB
Chunksize: 131072 bytes (1 clusters)
Total chunks: 409600
Free chunks: 376537 (91.9%)
HISTOGRAM OF FREE EXTENT SIZES:
Extent Size Range : Free extents Free Clusters Percent
256K... 512K- : 4 10 0.00%
512K... 1024K- : 251 1179 0.31%
1M... 2M- : 5 72 0.02%
8M... 16M- : 3 288 0.08%
32M... 64M- : 1 447 0.12%
128M... 256M- : 2 3371 0.90%
1G... 2G- : 1 13823 3.67%
2G... 4G- : 12 357347 94.90%
π₯ SEE ALSO π₯
debugfs.ocfs2(8) fsck.ocfs2(8) fsck.ocfs2.checks(8) mkfs.ocfs2(8) mount.ocfs2(8) mounted.ocfs2(8) o2cluster(8) o2image(8) tunefs.ocfs2(8)
Go read those too, iykyk. π
π AUTHORS π
Oracle Corporation
π COPYRIGHT π
Copyright Β© 2010, 2012 Oracle. All rights reserved.
Version 1.8.9 Β· January 2012 β that's the whole page bestie, no cap. Thanks for coming to my TED talk about filesystem info. Stay hydrated, keep your extents unwritten only when you mean it, and go query something iconic. π§β¨π
π¦ 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