o2info shows information about OCFS2 file systems. It differs from debugfs.ocfs2(8) in that it allows users with limited read privileges to query similar information. Users do not have to have the read privilege on the device as is expected by debugfs.ocfs2(8). This utility allows users to provide a path to an object on a mounted file system. The user needs to have the read privilege on that object.
The utility uses custom info ioctls to query information from a mounted file system. As these info ioctls were added starting in Linux kernel 2.6.37, this utility will not work on mounted OCFS2 file systems running on systems having older kernels.
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.
# 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.
# 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%