[CentOS] EL7: Detecting FS errors on XFS while mounted

Fri Nov 20 23:02:15 UTC 2015
Benjamin Smith <lists at benjamindsmith.com>

Is there a way of checking an XFS filesystem for clean/dirty status while 
mounted? 

One of the checks we've long performed is an FS-level error check. This is 
*not a full-on fsck*, this is "asking the file system if it noted any 
problems". This is done while the file system is mounted and "hot". For 
example, here's how we'd check an ext* partition: 

# debugfs -R "show_super_stats -h" /dev/md127  | grep -i "Filesystem state"
We'd look for "Filesystem state: clean" (or something else if not clean). 

ZFS also allows for a "hot & mounted" check for dirty file system: 
# zpool status

So far, I've been unsuccessful in finding an equivalent for XFS.