defrag

Christian Baer christian.baer at uni-dortmund.de
Sat Mar 3 13:53:33 UTC 2007


On Thu, 1 Mar 2007 17:39:05 -0500 Jerry McAllister wrote:

>> Well, it would do some, but for the greatest effect, you would need:
>>   dump + rm -rf * + restore
>> That would get it all.

> Of course, I should have re-emphasized that this is not needed.
> You will not improve performance.   Its only value might be to exercise
> every used file block on the filesystem to make sure it is still
> readable. And for that you don't need to nuke and rewrite things.

You could of try changing the above command into 'rm -rfP *'. That would
make sure everything on your file system is still readable. And it would
give you a lot of time to think about it. :-)

> Just doing the backup (which you should do anyway) will read up all
> used file space (except what you might have marked as nodump).

Actually, that way you won't get every sector on the drive - not unless
the drive is full to the brim anyway.

If you really just want to check the drive, use 
  smartctl -t long /dev/whatever

You could also try
  dd if=/dev/whatever of=/dev/null bs=1m

The idea with the backup isn't a bad one either. Cause if your drive
goes up in flames, you don't really care. You still have your data.

Regards
Chris


More information about the freebsd-questions mailing list