📖 ~1 min read
Table of contents
Symptom & Impact
xfs_repair refuses after dirty log
Environment & Reproduction
Unclean shutdown leaves XFS log requiring mount replay.
Root Cause Analysis
xfs_repair aborts unless the log is cleanly replayed first.
Quick Triage
Mount read-only or examine dmesg for XFS corruption banner.
Step-by-Step Diagnosis
Run: sudo xfs_info /dev/; sudo dmesg | grep -i xfs; sudo xfs_metadump for offline copy.

Solution – Primary Fix
sudo mount -o ro,norecovery /dev/ /mnt && umount; then sudo xfs_repair /dev/.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
If log cannot replay, use xfs_repair -L only after a metadump and full backup.
Verification & Acceptance Criteria
Filesystem mounts read-write and xfs_info shows no log corruption.
Rollback Plan
Restore from latest backup or snapshot; do not reuse zapped log volume in production.
Prevention & Hardening
Schedule routine xfs_scrub and enable barrier and fua on storage hardware.
Related Errors & Cross-Refs
Pairs with corruption of in-memory data and metadata I/O error log lines.
Related tutorial: View the step-by-step tutorial for centos-stream-9.
View all centos-stream-9 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
xfs_repair(8) and Red Hat XFS recovery KB.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.