file fragmentation

Duty Programmer duty at ariel.ucs.unimelb.edu.au
Thu Feb 28 16:59:34 AEST 1991


In article <3592 at d75.UUCP> woan at peyote.cactus.org writes:
>In article <476 at bally.Bally.COM> siva at bally.Bally.COM (Siva Chelliah/50000) writes:
>>I have few questions :
>>   1 ) Is there a way to find out the  fragmentation of a file system 
>>       (like the Norton utility for DOS)?
>
>I don't think so... Outside of some old UNIX/386 implementations, I
>don't really remember being able to do this with any UNIX file system
>(UFS perhaps? Certainly not BSD).
>

About two years ago (from memory) a program called 'fsanalyze' was posted
to the net. The program follows the inodes for a file and thereby determines
its fragmentation. I think it was posted to comp.sources.unix, so you
should check your local archives. If you get stuck, I think I have the code
buried on a tape somewhere.

>>   3) How to re-organize the file system ?
>

I presume you mean de-fragmentation. The trick is to sort the (inode) free list
by using 'fsck -s' (you will need to be root), which rebuilds the free list
and thereby makes it ordered, and then copy the fragmented file(s), then
delete the old one(s).

rab
--
Richard Brown                     | E-mail: rab at tauon.ph.unimelb.edu.au
School of Physics                 | Phone : +61 3 344 5081
University of Melbourne           | Fax   : +61 3 347 4783
Parkville Victoria AUSTRALIA 3052 | Telex : AA35185



More information about the Comp.unix.aix mailing list