fsck.gfs2(8)
π NAME π
okay bestie, so fsck.gfs2 is the offline GFS and GFS2 file system checker β like, it's the girl who shows up when the file system is NOT mounted and goes "let me look at you" β¨ (this page lives in the System Manager's Manual, section 8, iykyk).
πΈ SYNOPSIS πΈ
fsck.gfs2 [options] device
one device, a pile of options, and a whole lot of opinions. periodt.
π¨ WARNING π¨
All computers must have the filesystem unmounted before running fsck.gfs2. Failure to unmount from all nodes in a cluster will likely result in filesystem corruption. not "might", bestie β likely. do not be the main character who skips this step. π
β¨ DESCRIPTION β¨
fsck.gfs2 will check that the GFS or GFS2 file system on a device is structurally valid. It should not be run on a mounted file system. If file system corruption is detected, it will attempt to repair the file system. But ngl, there is a limit to what fsck.gfs2 can do π β if important file system structures are destroyed, such that the checker cannot determine what the repairs should be, reparations could fail. it's giving "we tried our best."
so here's the tea about other checkers: other file system checkers will not check the file system if it is "clean" (i.e. unmounted since the last use). But with gfs2, storage may be shared among several nodes in a cluster, and therefore problems may have been introduced on a different computer π. So therefore, fsck.gfs2 will always check the file system β unless the -p (preen) option is used, in which case it follows special rules (see below). she's thorough like that π
also! fsck.gfs2 will log a message to the system log on start and exit to aid debugging and administration. receipts = kept. π
π OPTIONS π
-aβ Same as the-p(preen) option. twin energy, same vibe.-fβ Force checking even if the file system seems clean. like, "no babes, I don't care that you look fine, we're doing this anyway." π₯-hβ Help.
This prints out the proper command line usage syntax. read the instructions bestie, they're there for you π«Ά
-qβ Quiet. π€«-nβ No to all questions. By specifying this option,fsck.gfs2will only show the changes that would be made, but not make any changes to the filesystem. window shopping only ποΈ
This option may not be used with the -y or -p/-a options.
-pβ Automatically repair ("preen") the file system if it is dirty and safe to do so, otherwise exit.
If the file system has locking protocol lock_nolock, it is considered a non-shared storage device and it is considered safe β
. If the locking protocol is lock_dlm and -a or -p was specified, the check is considered unsafe as it cannot be determined whether the device is mounted by other nodes in the cluster π¬. In this case a warning is given if any damage or dirty journals are found. The file system should then be unmounted from all nodes in the cluster and fsck.gfs2 should be run manually without the -a or -p options.
This option may not be used with the -n or -y options.
-Vβ Print out the program version information. version check, as one does π-vβ Verbose operation.
Print more information while running. she will NOT be quiet about it, and honestly? iconic. π
-yβ Yes to all questions. By specifying this option,fsck.gfs2will not prompt before making changes. consent pre-given, changes made, no takebacks π
This option may not be used with the -n or -p/-a options.
π SEE ALSO π
and that's the whole page, bestie!! this one comes to you straight from the System Manager's Manual β it's fsck.gfs2(8), so that's the source and the version tag, right there in the footer, periodt β¨π¦π go unmount your cluster first fr fr π«Ά
π¦ where this page comes from
- debian bookworm: gfs2-utils 3.5.0-2 Β· GPL-2.0-or-later
- debian trixie: gfs2-utils 3.6.1-1 Β· GPL-2.0-or-later
- ubuntu jammy: gfs2-utils 3.4.1-2 Β· GPL-2.0-or-later
- ubuntu noble: gfs2-utils 3.5.1-1 Β· GPL-2.0-or-later
- ubuntu questing: gfs2-utils 3.6.1-1
- ubuntu resolute: gfs2-utils 3.6.1-1build1 Β· GPL-2.0-or-later
- ubuntu stonking: gfs2-utils 3.6.1-2ubuntu1 Β· 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