Checking and Repairing an Ext File System
Use the fsck
utility to check and repair file
systems.
For file systems other than root
(/
) and
/boot
, mount
invokes file system checking if more
than a specified number of mounts have occurred or more than 180 days have elapsed without
checking having being performed. You can run fsck
manually if a file
system hasn't been checked for several months.
For more information, see the fsck(8)
manual page.
The following procedure describes how to check and repair an Ext file system.
Attention:
Running fsck
on a mounted file system can corrupt the file system and
cause data loss.
For the ext3
, and ext4
file system types, other commands that
are used to perform file system maintenance include dumpe2fs
and
debugfs
. dumpe2fs
prints super block and
block group information for the file system on a specified device.
debugfs
is an interactive file system debugger that requires expert
knowledge of the file system architecture.