[comp.unix.questions] File system defragmenter needed

simcha@kurz-ai.UUCP (Simcha Lerner) (08/24/89)

I am desperately seeking sources for a program to defragment my hard disk.
Due to a lot of files coming and going, I am left with many files broken
into small pieces and scattered throughout the disk.  

While I have seen this facility provided with some of the larger Unix
systems, I haven't seen such for smaller systems.  (I am running 
386/ix 2.0.2, a SysV.3.2 derivative.)

Any pointers to either a PD or commercial product would be greatly
appreciated.

Thanks in advance.

-- 
Simcha Lerner
Kurzweil Applied Intelligence

PLEASE NOTE ADDRESS: NO RETURN MAIL VIA bbn PLEASE

UUCP address:	kurz-ai!simcha@talcott.harvard.edu
	  or:	...{uunet,rutgers,ames}!harvard!talcott!kurz-ai!simcha

cck@deneb.ucdavis.edu (Earl H. Kinmonth) (08/24/89)

In article <310@kurz-ai.UUCP> simcha@kurz-ai.UUCP (Simcha Lerner) writes:
>
>I am desperately seeking sources for a program to defragment my hard disk.

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.

cander@unisoft.UUCP (Charles Anderson) (08/24/89)

From article <5176@ucdavis.ucdavis.edu>, by cck@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