Bernhard R. Erdmann wrote:
I've got a filesystem with 28 .iso images, the frags -f command shows:
# xfs_db -r /dev/shaktivg/xxx
xfs_db: frag -f
actual 355, ideal 29, fragmentation factor 91.83%
Try running xfs_bmap on those iso images, just give it file names as
its parameter. It will report how large the individual chunks of the files
are. Assuming say 200Mb in each image, 355 fragments is about 16 Mbytes
in each extent. It all depends on how they were written (one after the
other or
in parallel), and how full the filesystem is, and what state it was in
before you
wrote them. If you write a few hundred Mbytes into a filesystem which only
has small scattered chunks of free space you are going to get a fragmented
file, there is no way out of that.
Steve
# for dev in `df|grep /dev/vg2|awk '{print $1};'`; do
echo -n $dev ": "
/usr/sbin/xfs_db -c "frag -f" -r $dev
done
/dev/vg2/home : actual 56720, ideal 55427, fragmentation factor 2.28%
/dev/vg2/tmp : actual 5016, ideal 5004, fragmentation factor 0.24%
/dev/vg2/usr : actual 111119, ideal 111110, fragmentation factor 0.01%
/dev/vg2/var : actual 10353, ideal 8147, fragmentation factor 21.31%
/dev/vg2/exim : actual 11, ideal 11, fragmentation factor 0.00%
/dev/vg2/news : actual 416937, ideal 400006, fragmentation factor 4.06%
/dev/vg2/squid : actual 99132, ideal 99088, fragmentation factor 0.04%
/dev/vg2/opt : actual 48, ideal 48, fragmentation factor 0.00%
/dev/vg2/tftp : actual 25916, ideal 25855, fragmentation factor 0.24%
/dev/vg2/dumps : actual 17, ideal 5, fragmentation factor 70.59%
/dev/vg2/stor : actual 17952, ideal 17949, fragmentation factor 0.02%
/dev/vg2/heise : actual 151162, ideal 151162, fragmentation factor 0.00%
/dev/vg2/mp3 : actual 1162, ideal 1162, fragmentation factor 0.00%
/dev/vg2/rawhide : actual 2672, ideal 2244, fragmentation factor 16.02%
/dev/vg2/redhat : actual 1862, ideal 1700, fragmentation factor 8.70%
/dev/vg2/rhlcd : actual 47260, ideal 47259, fragmentation factor 0.00%
/dev/vg2/scratch : actual 1369, ideal 1305, fragmentation factor 4.67%
/dev/vg2/sw : actual 2668, ideal 2554, fragmentation factor 4.27%
/dev/vg2/hp710 : actual 5041, ideal 5041, fragmentation factor 0.00%
/dev/vg2/hp710loc : actual 17390, ideal 17361, fragmentation factor
0.17%
/dev/vg2/imap : actual 296624, ideal 295712, fragmentation factor 0.31%
|