Product SiteDocumentation Site

8.5.  Repairing an XFS File System

To repair an XFS file system, use xfs_repair, as in:
xfs_repair /dev/device
The xfs_repair utility is highly scalable, and is designed to repair even very large file systems with many inodes efficiently. Note that unlike other Linux file systems, xfs_repair does not run at boot time, even when an XFS file system was not cleanly unmounted. In the event of an unclean unmount, xfs_repair simply replays the log at mount time, ensuring a consistent file system.

Note

The xfs_repair utility cannot repair an XFS file system with a dirty log. To clear the log, mount and unmount the XFS file system. If the log is corrupt and cannot be replayed, use the -L option ("force log zeroing") to clear the log, i.e. xfs_repair -L /dev/device. Note, however, that this may result in further corruption or data loss.
For more information about repairing an XFS file system, refer to man xfs_repair.