How to check XFS filesystem version?
Since version 3.15, the kernel tells you the version of XFS used in each filesystem as it mounts it; dmesg | grep XFS
should give you something like
[1578018.463269] XFS (loop0): Mounting V5 Filesystem
Instead of loop0
on your system you'll get the underlying device, and V5
will be replaced by whatever version your filesystem uses.
Older kernels officially supported XFS version 4 filesystems, but could mount version 5 filesystems (since mid 2013); for the latter, the kernel would print
Version 5 superblock detected. This kernel has EXPERIMENTAL support enabled!
when the filesystem was mounted.
You can check the on disk format version of a XFS file system with xfs_db
.
Example output of an old (V4) XFS file system on my system:
xfs_db -r /dev/...
xfs_db> version
versionnum [0xb5b4+0x8a] = V4,NLINK,DIRV2,ATTR,ALIGN,DALIGN,LOGV2,EXTFLG,MOREBITS,ATTR2,LAZYSBCOUNT,PROJID32BIT
Output of a new (V5) XFS file system (created with xfsprogs version 4.9.0):
xfs_db -r /dev/...
xfs_db> version
versionnum [0xb4a5+0x18a] = V5,NLINK,DIRV2,ALIGN,LOGV2,EXTFLG,MOREBITS,ATTR2,LAZYSBCOUNT,PROJID32BIT,CRC,FTYPE,FINOBT
We can check using below command.
# yum list installed | grep xfs
# yum info xfsprogs