truncating root directory of a file system
ecl at mtgzy.UUCP
ecl at mtgzy.UUCP
Mon Dec 8 23:52:02 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.
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 at rutgers.rutgers.edu
In this world you must be oh so smart or oh so pleasant.
--Elwood P. Dowd (HARVEY)
More information about the Comp.unix.wizards
mailing list