Defragging XFS File Systems

Kenneth Emerson kenneth.emerson at gmail.com
Mon Jun 6 22:52:48 CDT 2011


I hadn't given much thought to fragmentation of my TV recordings volume
(XFS) until reading through some MythTV-users threads recently that
mentioned how fragmented an XFS file system could become.  After running
xfs_db, I found out that my fs appeared to be quite bad:

$ sudo xfs_db -c frag -r /dev/mapper/appl_vg-appl_lv
 actual 1138668, ideal 11023, fragmentation factor 99.03%

I then ran xfs_fsr with all defaults (ran for two hours) and then re-ran
xfs_db and got the following results:

$ sudo xfs_db -c frag -r /dev/mapper/appl_vg-appl_lv
invalid numrecs (27111) in bmapbtd block
invalid numrecs (4716) in bmapbtd block
invalid numrecs (58978) in bmapbtd block
actual 1034793, ideal 11024, fragmentation factor 98.93%

The fragmentation level was reduced, but I was concerned about the error
messages.  Before I go any further, am I corrupting my file system with the
defragging or are these "invalid numrecs" messages unimportant?

Google didn't offer much help.

Regards,

Ken E.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://oss.sgi.com/pipermail/xfs/attachments/20110606/995c96d8/attachment.htm>


More information about the xfs mailing list