Article View: comp.sys.sun
Article #7973Re: Sun-Spots Digest, v10n86 [Miscellaneous] How to increase the size of the /usr partition?
From: Basile STARYNKEVITCH
Date: Tue, 04 Jun 1991 18:40
Date: Tue, 04 Jun 1991 18:40
41 lines
2887 bytes
2887 bytes
In reply to Sun-Spots Digest, v10n86
Date: Sun, 21 Apr 1991 16:26:37 GMT
From: jacquier@gsbsun.uchicago.edu (Eric Jacquier)
Subject: How to increase the size of the /usr partition?
X-Art: Usenet #14
You need to make a new file system in a changed partition of a disk. This means you lose its (previous) content.
In your case, you will lose (and restore) your /usr !!.
The problem is that you do need this /usr partition to make a new file system. (you need /usr/etc /usr/bin /usr/lib). If you could mount (temporarily) /usr from another sun4c server, you could manage. Otherwise, you could copy a tiny /usr system into an unused partition (e.g. your previously dumped /home) and then mount it... All that is tricky (and risky..)
So, first of all, you have to backup your disk (with a full dump).
/usr/etc/dump ...
(I strongly suggest a full disk dump (of /usr and /home...)
Then, copy a minimal stuff (into unchanged root partition) to be able to restore::
# cp /usr/etc/restore /sbin/restore
# cp /usr/etc/dump /sbin/restore
# cp /usr/bin/tar /sbin/tar
# cp /usr/bin/mv /sbin/mv
# cp /usr/bin/ln /sbin/ln
now, remount /usr by rebooting boot /vmunix -asw or by
# /sbin/mount -v newusr /usr ## newusr is server:/usr or a /dev/rsd0h or something)
(NB: these should all be statically linked programs)
Once you have changed the partition of your disk (with:
# format sd0
format>partition
format>g ### change /usr partition, etc
...
format>label
format>quit
)
Now make a new file system on your changed partition. This build up the inodes, etc...
# /usr/etc/newfs /dev/rsd0g
And then restore the saved /usr stuff
# /sbin/restore ....
Then reboot your system
If anything fails, you have to make a full reinstall...
You can't shrink the swap partition easily (i.e. you have to use the MINIX stuff on boot tape) - because there may be some processes currently swapping on the lost portion of shrinked swap partition. But you could avoid a full reinstall by copying dump stuff into sbin, and then restoring.. (restoring is faster than reinstalling).
However, you can easily grow the swap partition...
I did make such a tricky stuff (changing /usr partition..) by temporarily NFS mounting /usr - maybe some details are wrong, so be careful !!
Technical Details
Message-ID:
<3082@brchh104.bnr.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: basile@soleil.cea.fr (Basile STARYNKEVITCH) Newsgroups: comp.sys.sun Subject: Re: Sun-Spots Digest, v10n86 [Miscellaneous] How to increase the size of the /usr partition? Keywords: No Digest Subjects in Unmoderated Mode Message-ID: <3082@brchh104.bnr.ca> Date: 4 Jun 91 18:40:00 GMT Sender: news@brchh104.bnr.ca Organization: Sunspots, Psuedo-Unmoderated Lines: 43 Approved: sun-spots@rice.edu X-Original-Date: 10 May 91 10:06:51+0200