Originally Posted by jiml8
I also wonder what would happen if you were to copy the entire contents of one partition to another drive (not an image...use the cp command...), then wipe and reformat the original partition, then copy all the files back into place. This specifically would permit the file system to reorganize the drive according to whatever scheme it considers optimum.
I have done this in the past, usually when enlarging a system partition or changing drives, and I have not noticed any particular performance improvement from doing it. However, as I say, I also have not noticed any deterioration over time, until the drive or partition is nearly full anyway.
Actually, this is one way of crudely "defragmenting" or rather "reorganizing" things on a filesystem that doesn't support such functions.
For example on jfs you can do this:
dd bs=4k if=/dev/hdc1 of=/dev/hdj1
mount -o ro /dev/hdj1 /fs/hdj1
mount -o rw /dev/hdc1 /fs/hdc1
(cd /fs/hdj1 && tar -cS -b8 --one -f - .) | (cd /fs/hdc1 && tar -xS -b8 -p -f -)
But, if you replace the jfs specific commands, this should work for any filesystem.
The only thing that comes close to what the OP might want is what I mentioned earlier, "xfs_fsr" which works only with xfs filesystem.
If you really want something like the proprietary, closely guarded secret I-FAAST, e-mail them and tell them to port it to Linux (I doubt they will answer). Or, if you know exactly how it works, get a team together and try to implement it ... but in the US you may get sued for software patent infringement if they have one (which I'm sure they do).