From owner-freebsd-questions@FreeBSD.ORG Tue Nov 25 05:11:09 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7001516A4CF for ; Tue, 25 Nov 2003 05:11:09 -0800 (PST) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 611BB43FE1 for ; Tue, 25 Nov 2003 05:11:04 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) hAPDAsqt078632 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 25 Nov 2003 13:10:55 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id hAPDAs2Q078631; Tue, 25 Nov 2003 13:10:54 GMT (envelope-from matthew) Date: Tue, 25 Nov 2003 13:10:54 +0000 From: Matthew Seaman To: Roland Giesler Message-ID: <20031125131054.GA69931@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Roland Giesler , questions@freebsd.org References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.5.1i X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on happy-idiot-talk.infracaninophile.co.uk cc: questions@freebsd.org Subject: Re: Resizing disk labels X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2003 13:11:09 -0000 --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 25, 2003 at 02:16:52PM +0200, Roland Giesler wrote: > I have installed FreeBSD in a server with the default setting in the label > editor. I hope my terminology is correct, since I'm refering to /etc /usr > etc. Now I've installed a squid, KDE, DHCP, Java (not complete yet!), > Apache and some other stuff. While installing Qmail, I ran out of disk > space on /etc. but /usr still has 17GB free. Terminology slightly muddled, but I understand clearly enough. Your partitions (as laid out within the containing slice using disklabel(8)) turn out not to be quite suitable. Do you really mean that you've run out of space in /etc? The default with qmail is to install under /var/qmail -- which is a result of DJB's somewhat ideosyncratic take on hier(7). Now /var is fairly small in the default layout generated by sysinstall(8), and I can see you overflowing it fairly easily. You can reclaim some space in /var by de-installing and re-installing the qmail port using the more usual PREFIX setting of /usr/local: # pkg_delete -f qmail-\* # portinstall -m PREFIX=3D/usr/local mail/qmail However, /var is where people's inboxes are stored by default (under /var/mail) and if this machine is going to do a lot of mail traffic then you need a fair amount of space there. If it really is /etc that has run out of space then first question is: did you put /etc on a different partition to the root? If so, you're going to have a great deal of difficulty rebooting your system. So don't do that. /etc should have a relatively small amount of stuff in it, but those files include all of the really important system configuration files, the scripts used to do the actual booting process and other goodies that the system has to be able to find very early in the boot process when only the root partition is yet available. =20 > How can I resize the "labels" so /etc grows to 1GB for example? I've > searched all over and it appears that one can grow the size, but not shri= nk > it? The answer is "with some difficulty". If you want to work "in place" -- without trashing the existing contents of a filesystem -- the only thing you can do is increase the size of the partition, and then only be adding new space immediately adjacent to the current end of the partition. Adding space at the end of a partition either requires you to be using something like vinum(8), or for you to have cunningly left an unused gap between the end of the partition you want to expand and the next partition on the drive. You can't steal some space from the front of the next partition without destroying the filesystem and any contents on it. Ultimately the least problematic way for you to procede would be to back up everything you've done so far, wipe your disk clean and start over with a fresh install: this time, make sure you choose better sizes for the different partitions. If you take care to keep the partitions in the same order as before, you should be able to restore your the back-ups of your previous setup onto the re-partitioned drive without difficulty. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --ZGiS0Q5IWpPtfppv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/w1TedtESqEQa7a0RAh1zAJ94hAFyST6Eycap5hvpcHz9a2Us3wCffcpE Pi8Ptdr5Ss+Cn3GKuxeE2nY= =yROq -----END PGP SIGNATURE----- --ZGiS0Q5IWpPtfppv--