📖 ~1 min read
Table of contents
Symptom & Impact
Filesystem mounts read-only or refuses to mount with XFS metadata I/O errors in dmesg.
Environment & Reproduction
Typically follows an unclean shutdown, controller failure, or unflushed write cache.
Root Cause Analysis
Journal replay cannot recover certain inode or AGI structures so the kernel marks the FS unusable.
Quick Triage
Run xfs_repair -n on the unmounted device to enumerate damaged inodes before changes.
Step-by-Step Diagnosis
Run: sudo umount /data; sudo xfs_repair -n /dev/mapper/vg-data.

Solution – Primary Fix
Run: sudo xfs_repair /dev/mapper/vg-data; sudo mount /data; xfs_info /data.
Still having issues? Our Server Management team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Restore data from backup if xfs_repair cannot fix the AGF/AGI without orphaning critical files.
Verification & Acceptance Criteria
Filesystem mounts cleanly and xfs_info shows healthy AG metadata with no error counters.
Rollback Plan
Restore from snapshot or previous backup if repair removes required directories or files.
Prevention & Hardening
Enable storage controller battery monitoring and configure fs.xfs.error_level for early warning.
Related Errors & Cross-Refs
Related to dm-multipath errors and write cache battery failures.
Related tutorial: View the step-by-step tutorial for centos-stream-10.
View all centos-stream-10 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
xfs_repair(8) and Red Hat XFS administration guide.
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.