File System Checking with fsck
Monday, March 24th, 2008The system utility fsck (for “file system check” or “file system consistency check”) is a tool for checking the consistency of a file system in the Unix system and clones thereof.
Generally, fsck is run automatically at boot time when the system detects that a file system is in an inconsistent state, indicating a non-graceful shutdown, such as a crash or power loss. Typically, fsck utilities provide options for either interactively repairing damaged file systems (the user must decide how to fix specific problems), automatically deciding how to fix specific problems (so the user doesn’t have to answer any questions), or reviewing the problems that need to be resolved on a file system without actually fixing them.
Fsck can also be run manually by the root account if there is believed to be a problem with the file system. However, running fsck on a mounted file system can potentially cause severe data corruption/loss.