xfs_repair

Repair XFS filesystems

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
Safer / dry-run alternatives
xfs_repair -n <device>Check without modifying
What it does

Repairs XFS filesystems, which must be unmounted. -n only checks.

Common flags
FlagMeaning
-nCheck only, no changes
-LZero the log (data loss)⚠ Discards the metadata log.
Examples
xfs_repair -n /dev/sdb1Dry run · explain & risk-check →
Related
fsck mount
Open the full explainer →More in Disks & Filesystems

Reference text is hand-written and may be incomplete — check man xfs_repair for your version. Test destructive commands on a non-production system first.