fsck.ocfs2(8)

๐Ÿ“ฆ
version 1.8.9 ยท 3 versions
, in fedora 44, ubuntu resolute, ubuntu stonking

๐Ÿ’– fsck.ocfs2 โ€” the OCFS2 file system check bestie ๐Ÿ’–

okay so this is the fsck.ocfs2 page from the OCFS2 Manual Pages and honestly? it's a lot, but we're gonna get through it together, no cap. ๐Ÿซถ


โœจ NAME โœจ

fsck.ocfs2 โ€” check an OCFS2 file system. that's it, that's the whole vibe. it's the girl who walks in and goes "soโ€ฆ what's going on in here" and then actually fixes it. ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

fsck.ocfs2 [ -pafFGnuvVy ] [ -b superblock block ] [ -B block size ]
device

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

fsck.ocfs2 is literally the tool you use to check an OCFS2 file system. it looks at your filesystem, finds the mess, and (depending on your flags) cleans it up.

device is the file where the file system is stored, like /dev/sda1 for example. and lowkey, it's almost always gonna be a device file โ€” but a regular file works too, so don't stress. ๐ŸŽ€


๐Ÿ’… OPTIONS ๐Ÿ’…

  • -a โ€” this one does the exact same thing as -p. it's only still here for backwards compatibility, periodt. the docs literally suggest you use -p whenever you can instead of this. so likeโ€ฆ use -p. ๐Ÿ™ˆ
  • -b superblock block โ€” normally fsck.ocfs2 reads the superblock from the first block of the device, like a good girl. this option lets you specify an alternate block for it to read the superblock from instead. (use -r instead of this option, though โ€” that's the word from on high. ๐Ÿ‘€)
  • -B blocksize โ€” the block size, in bytes, can range from 512 to 4096. a value of 0 โ€” which is the default โ€” means "auto-detect the blocksize for me bestie". โœจ
  • -D โ€” optimize directories in the filesystem. this makes fsck.ocfs2 coalesce the directory entries so the filesystem performance gets better. glow-up for your directories, fr fr. ๐Ÿ”ฅ
  • -f โ€” force checking even if the file system is clean. like, "i don't care that you said you're fine, we're checking anyway." ๐Ÿ’€
  • -F โ€” by default fsck.ocfs2 checks in with the cluster services to make sure the volume isn't in-use (mounted) on any node in the cluster before it proceeds. -F skips that check entirely and should only be used when you can guarantee the volume isn't mounted on any node in the cluster.
โš ๏ธ WARNING: if the cluster check is disabled and the volume is mounted on one or more nodes, file system corruption is very likely. if you're unsure, do not use this option. i'm so serious, bestie. ๐Ÿ˜ญ
  • -G โ€” usually fsck.ocfs2 will silently assume that inodes whose generation number doesn't match the generation number of the super block are unused inodes. this option makes it ask you whether those inodes should actually be marked unused. it's giving "let the girl decide." ๐Ÿงš
  • -n โ€” gives the 'no' answer to every question fsck will ask. this guarantees the file system will not be modified and the device will be opened read-only. bonus: the output of fsck.ocfs2 with this option can be redirected to produce a record of a file system's faults. very "just here to observe, not to participate." ๐Ÿ‘‘
  • -p โ€” automatically repair ("preen") the file system. this makes fsck.ocfs2 automatically fix any problem that can be safely corrected without human intervention. if there are problems that do require intervention, the descriptions get printed and fsck.ocfs2 exits with the value 4 logically or'd into the exit code. (see the EXIT CODE section, babes.) this option is normally used by the system's boot scripts. ๐ŸŒˆ
  • -P โ€” show progress. we love a little progress bar moment. โญ
  • -r backup-number โ€” mkfs.ocfs2 makes up to 6 backup copies of the superblock at offsets 1G, 4G, 16G, 64G, 256G and 1T, depending on the size of the volume. use this option to specify which backup โ€” 1 thru 6 โ€” to use to recover the superblock. ๐Ÿ“
  • -t โ€” show I/O statistics. and if you specify this option twice, it shows the statistics on a pass by pass basis. double the flag, double the stats. ๐Ÿ’œ
  • -y โ€” gives the 'yes' answer to all questions that fsck will ask. this will repair all faults that fsck.ocfs2 finds, but it will not give the operator a chance to intervene if fsck.ocfs2 decides that it wants to drastically repair the file system. so likeโ€ฆ she's gonna do what she's gonna do. ๐Ÿ˜ณ
  • -v โ€” this option causes fsck.ocfs2 to produce a very large amount of debugging output. it's giving "verbose" and it is not playing around. ๐Ÿ’€
  • -V โ€” print version information and exit. bye bestie! ๐Ÿ‘‹

๐Ÿ‘‘ EXIT CODE ๐Ÿ‘‘

the exit code returned by fsck.ocfs2 is the sum of the following conditions:

0    - No errors
1    - File system errors corrected
2    - File system errors corrected, system should
       be rebooted
4    - File system errors left uncorrected
8    - Operational error
16   - Usage or syntax error
32   - fsck.ocfs2 canceled by user request
128  - Shared library error

it's math, babe. add 'em up. ๐Ÿงฎโœจ


๐Ÿ’– SEE ALSO ๐Ÿ’–

debugfs.ocfs2(8) ยท fsck.ocfs2.checks(8) ยท mkfs.ocfs2(8) ยท mount.ocfs2(8) ยท mounted.ocfs2(8) ยท o2cluster(8) ยท o2image(8) ยท o2info(1) ยท tunefs.ocfs2(8)

go read those too, iykyk. ๐Ÿฆ‹


๐ŸŒŸ AUTHORS ๐ŸŒŸ

Oracle Corporation. this man page entry derives some text โ€” especially the exit code summary โ€” from e2fsck(8) by Theodore Y. Ts'o <tytso@mit.edu>. shoutout to the originals, respect where respect is due. ๐Ÿ™Œ


Copyright ยฉ 2004, 2012 Oracle. All rights reserved.


and that's the whole thing!! Version 1.8.9, dated January 2012 โ€” written back when some of y'all were literally in diapers, but she still ate and left no crumbs. periodt. ๐Ÿ’–โœจ๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from