Thought of the day:
An XFS file system with 98% free space, 6 files and 61.11% fragmentation:
# df -h . Filesystem Size Used Avail Use% Mounted on /dev/sdb1 100G 1.1G 99G 2% /test # # find . -type f -print | wc -l 6 # xfs_db -r -c frag /dev/sdb1 actual 18, ideal 7, fragmentation factor 61.11%
When I asked about this oddity in a conversation with Dave Chinner (XFS Kernel owner) I was expecting a lot of complex background on what this 61.11% actually means. His response? I’ll quote:
18 – 7 / 18 = 0.6111111
[…]it’s been that way forever. Ignore it – it’s much more important to look at the files themselves […]
I like Dave’s candor and have found that individual file analysis does yield interesting information as well as I showed in my post entitled Little Things Doth Crabby Make – Part XVII. I See xfs_mkfile(8) Making Fragmented Files.
As for deprecated tools, I also have no problem with that. There may have been a day when this command spat out useful information (perhaps in XFS’s previous SGI Unix life?) and folks have scripted to it. Basically, OS distributions can’t just discard such a command. It just goes that way…no problem.
Way Off Topic
Maybe the next time Dave is in the Bay Area we can repeat the curry! That would be nice.