XFS
Cheat sheet · https://pcornel.dk/topic.php?topic=3951
Answer
XFS organizes storage into allocation groups to scale metadata operations and journals metadata changes. Online growth is supported, while shrink support and repair behavior depend on implementation/version and must not be assumed.
Remember
- XFS allocation groups ≠ RAID stripes.
- Journal recovery ≠ full data validation.
- xfs_repair ≠ generic online fix.
- Large free capacity ≠ absence of metadata or underlying I/O faults.
First checks
xfs_info <mount>— geometryxfs_repair -n /dev/<dev>— dry-run check (unmounted)xfs_db -r -c frag /dev/<dev>— fragmentation
Verify in this order
file → AG → inode → extents
Where it usually breaks
First mismatch in media/provider → controller/pool → logical object → path/protocol → filesystem/share/object namespace → consumer workload; preserve identity/pre-state before mutation.
Filesystems → XFS filesystem map
| Filesystem boundary | What to verify | Proof limit |
|---|---|---|
| Identity / attachment | Filesystem type, source/backing object, mount/attachment target and effective options | Presence or mount state alone does not prove consistency or lower-layer health |
| Capacity / metadata | Data space, metadata/inodes, quotas/reservations and filesystem state | Free bytes at one layer do not prove allocation can succeed end to end |
| Failure boundary | A mounted XFS filesystem proves namespace availability for tested operations; it does not prove all allocation groups or backing storage are healthy. | Correlate filesystem evidence with the backing volume/path/backend before repair |
| Acceptance | Healthy evidence: expected XFS mount is active, allocation succeeds, filesystem messages are clean and representative I/O completes without correlated lower-layer errors. | Close only after the original path/workload and read-back check succeeds |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3951