Check XFS fragmentation

Using XFS means, that you have to deal with fragmentation of your files. Disregarding fragmentation, XFS is a wonderful filesystem which never caused any problems here.

To check fragmentation, we use the xfs-debug tool in read-only mode:

xfs_db -c frag -r /dev/sdX#

At my server it would look like that:

stargazer ~ # xfs_db -c frag -r /dev/sda7
actual 376951, ideal 373687, fragmentation factor 0.87%


Leave a Reply

Your email address will not be published. Required fields are marked *