LinuxCommandLibrary

xfs_repair

Repair XFS filesystem

TLDR

Repair partition

$ sudo xfs_repair [path/to/partition]
copy

SYNOPSIS

xfs_repair [OPTIONS] DEVICE

DESCRIPTION

xfs_repair repairs an XFS filesystem. It checks and fixes filesystem metadata, directory structures, and allocation information.
The filesystem must be unmounted before repair. A log replay may be needed first.

PARAMETERS

-n

No modify mode (check only)
-L
Force log zeroing (data loss risk)
-v
Verbose output
-d
Repair dangerously (allow repair on mounted FS)
-m MAXMEM
Maximum memory usage

CAVEATS

Requires unmounted filesystem. Using -L can cause data loss. Backup important data before repair. May require running multiple times.

SEE ALSO

xfs_admin(8), fsck(8), mkfs.xfs(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community