o2info(1)

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

πŸ’– 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 in mkfs.ocfs2(8) format.
  • --freeinode β€” Show the inode (allocated/free) count for all slots in the file system. Every single one. No skipping. πŸ“
  • --freefrag chunksize β€” 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 extended stat(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 Β© 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