User Directories

Michael Stefanik mike at bria.UUCP
Thu May 2 03:02:05 AEST 1991


In an article, graeme at ccu1.aukuni.ac.nz (Graeme Moffat) writes:
> Michael, could you post the details of how to do this?  I've seen several
> others asking how, it must be a candidate for the FAQ. There's something I'm
> missing to umount /usr, even in maintenance mode.

To "shrink" the /usr filesystem back down to an optimum size,
which is about 140,000 blocks (70M), take the following steps:

	1. go into maintenance mode using the "/etc/shutdown -Fm"
	   command; wait until the single user message is given
	   by INIT.

	2. backup all of the files in /usr, using the command:

		# find ./usr -print | backup -iqvf /dev/rmt0

	3. unmount the /usr filesystem using the "/etc/umount /usr"
	   command

	   IF THE UNMOUNT FAILS, THEN IT'S BECAUSE YOU'RE USING THE
	   KORN OR BOURNE SHELL.

	   Switch to the C shell using the command "exec /bin/csh"

	4. remove the /usr filesystem using the command "rmfs /usr";
	   the filesystem MUST be unmounted in order to do this.
	   the "dspmsg" command will not be found; ignore this error.
	   edit /etc/filesystems, removing the /usr stanzas

	5. create a new /usr filesystem using the command:

		# crfs -v jfs -grootvg -a size=140000 -m/usr -Ayes -prw

	6. mount the new /usr filesystem using the "/etc/mount /usr"
	   command; check it using the "df -v" command.

	7. restore the file using "restore -xqvf /dev/rmt0"

	8. Sync and reboot the system; you now have a smaller /usr
	   filesystem

This should be about it.  Works for me, but try at your own risk.  Your
mileage may differ.

-- 
Michael Stefanik, MGI Inc, Los Angeles | Opinions stated are never realistic
Title of the week: Systems Engineer    | UUCP: ...!uunet!bria!mike
-------------------------------------------------------------------------------
If MS-DOS didn't exist, who would UNIX programmers have to make fun of?



More information about the Comp.unix.aix mailing list