truncating root directory of a file system
David E. Miran
dem at uwslh.UUCP
Wed Dec 10 00:55:31 AEST 1986
In article <511 at cdx39.UUCP>, jc at cdx39.UUCP (John Chambers) writes:
> Hey, here's a good puzzle for a Unix file-system wizard.
> You know how some directories (like /usr/spool/uucp) can
> get really huge... The usual solution is to rebuild
> the directory - you rename it, create a new one in its
> place, and moving the contents from the old one to the new.
>
> Well, there's a case where this doesn't work too well.
> This is the root directory of a file system.
There is a very straightforeward solution to this problem, which
also cleans up other problems related to poor allocation of parts
of the disk unit.
1. Do a full save of the unit to tape.
2. Unmount the unit.
3. Recreate a file system on the unit using newfs or mkfs.
4. Do a full restore of the unit from tape.
5. Do a full save again since all the creation dates change.
This is also a good time to check your average file size and perhaps
recreate the unit with a larger number of bytes per inode.
The Berkeley default is very conservative. On our system we gain
several megabytes of useable space per 150 M partition by increasing
the number of bytes per inode.
--
David E. Miran ...!{seismo,harvard,topaz,ihnp4}!uwvax!uwslh!dem
Wisconsin State Hygiene Lab or uwslh!dem at rsch.wisc.edu
University of Wisconsin (608) 262-0019
465 Henry Mall
Madison, WI 53706
More information about the Comp.unix.wizards
mailing list