File system defragmenter needed

Charles Anderson cander at unisoft.UUCP
Fri Aug 25 02:38:51 AEST 1989


>From article <5176 at ucdavis.ucdavis.edu>, by cck at deneb.ucdavis.edu (Earl H. Kinmonth):
> On some systems, such as SCO Xenix, an approach such as the following
> has the effect of defragmenting file systems.
> (a)	backup up the file system you want to defragment (or at least
> major directory trees in that system);
> (b) verify the backup;
> (c) remove the backed up files;
> (d) fsck -s
> (e) restore from the back up.

A faster alternative to steps c and d is mkfs.  This will have the effect
of removing all files and rebuilding the free list and it runs a lot
faster than "rm -fr *" for full file systems.  When using fsck or mkfs
to build a free list, be sure you have reasonable vaules for the gap
and blocks/cyl.  Don't let them default; they really do make a difference.


-- 

Charles.
{sun, amdahl, ucbvax, pyramid, uunet}!unisoft!cander



More information about the Comp.unix.wizards mailing list