Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!clyde!cbatt!ihnp4!drutx!mtuxo!mtgzy!ecl From: ecl@mtgzy.UUCP Newsgroups: comp.unix.wizards Subject: Re: truncating root directory of a file system Message-ID: <2302@mtgzy.UUCP> Date: Mon, 8-Dec-86 08:52:02 EST Article-I.D.: mtgzy.2302 Posted: Mon Dec 8 08:52:02 1986 Date-Received: Mon, 8-Dec-86 22:18:35 EST References: <511@cdx39.UUCP> Organization: AT&T, Middletown NJ Lines: 30 Keywords: / /usr /usr/lib truncation Summary: tricky! In article <511@cdx39.UUCP>, jc@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. How about: 1) Unmount all file systems. 2) Make another copy of root on some spare slice (volcopy). 3) Boot off the spare slice. 4) Mount the old root as /mnt. 5) Cpio /mnt to a directory Nmnt (you may need another spare slice). 6) rm -fr /mnt and cpio Nmnt back to /mnt. 7) Unmount /mnt. 8) Reboot off the original slice. If slices are tight, you could probably do #5 and #6 using tape. (This sounds like it should work, but I make no promises.) Evelyn C. Leeper (201) 957-2070 UUCP: ihnp4!mtgzy!ecl ARPA: mtgzy!ecl@rutgers.rutgers.edu In this world you must be oh so smart or oh so pleasant. --Elwood P. Dowd (HARVEY)