Michael Monnerie wrote:
xfs comes with It does have built-in, xfs-approved utilities for stats and defragmenting built-in.On Freitag, 9. Februar 2007 04:08 Peter Koczan wrote:Case in point, I use xfs as the filesystem running under postgres, and after a few days the "major" database clusters showed ~90% fragmentation on their respective partitions (which is about a 10 to 1 ratio of file fragments to files). After running a defragmenterDoes xfs have such stats, and defragmenter included? It could be a good idea for me to use that, then. Currently I use reiserfs.mfg zmi
xfs_db gives stats (for fragmentation use xfs_db -c frag -r /dev/XXX). This works even if the filesystem is mounted and active, but I believe that old stats are cached until said filesystem is remounted or until some stat collection process runs.
xfs_fsr is the defragmenter (simply use xfs_fsr /dev/XXX). It's safe to run this on an active filesystem/database partition, because it throws away the fragmented data if files are changed. So, for full defragmentation, you'll either want to run it offline, unmounted, or during idle times.
Peter