Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!munnari.oz.au!ariel!duty From: duty@ariel.ucs.unimelb.edu.au (Duty Programmer) Newsgroups: comp.unix.aix Subject: Re: file fragmentation Message-ID: <422@ariel.ucs.unimelb.edu.au> Date: 28 Feb 91 05:59:34 GMT References: <476@bally.Bally.COM> <3592@d75.UUCP> Organization: Information Technology Services, University of Melbourne Lines: 31 In article <3592@d75.UUCP> woan@peyote.cactus.org writes: >In article <476@bally.Bally.COM> siva@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@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