From owner-freebsd-questions@FreeBSD.ORG Sun Dec 17 08:18:35 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7109216A403 for ; Sun, 17 Dec 2006 08:18:35 +0000 (UTC) (envelope-from andersgo@alge.anart.no) Received: from alge.anart.no (alge.anart.no [195.159.18.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB9C343C9E for ; Sun, 17 Dec 2006 08:18:34 +0000 (GMT) (envelope-from andersgo@alge.anart.no) Received: from [IPv6:::1] (andersgo@alge.anart.no [195.159.18.67]) by alge.anart.no (8.13.0/8.13.0) with ESMTP id kBH8IStA001033; Sun, 17 Dec 2006 09:18:29 +0100 (CET) Message-ID: <4584FD58.5040803@alge.anart.no> Date: Sun, 17 Dec 2006 09:18:32 +0100 From: Anders Gulden Olstad User-Agent: Thunderbird 1.5.0.8 (X11/20061119) MIME-Version: 1.0 To: Bradley Giesbrecht References: <00190780-C6FE-42DB-9AD8-5D985625545F@pixilla.com> In-Reply-To: <00190780-C6FE-42DB-9AD8-5D985625545F@pixilla.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: var out of space X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Dec 2006 08:18:35 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bradley Giesbrecht wrote: > Hello, > > > I inherited a freebsd installation with a var slice/mount that is to > small and filling up all the time. > > What type of info should I provide to allow someone to help me with a > solution? > > I would very much prefer to not install another drive just for /var. > > /usr has plenty of space. Can I mount var off of /usr? Given that I don't know what version of FreeBSD you're running, I would first try to move and symlink /var into /usr Got to single user mode first. Then copy /var with cpio # find /var -print | cpio -pvdmu /usr Remove the old /var and make a symlink to /usr/var # rm -rf /var # ln -s /usr/var var Reboot to normal operations. Second - if all seems like to work well - I would perhaps prefer to expand the g partition into the old e partition and do a growfs on /usr to make use of the extra space left over from old /var, IF these two partitions are close neighbours on the disk. As I understand it's only possible to growfs within a partition, so we need to merge the old e partition with the existing g. Go to single user mode again # bsdlabel -e /dev/ad0s1 Add the size of the g partition to the f partition in the editor. Delete the g partition line and save. Run a growfs on the "new" g # growfs /dev/ad0s1g Reboot. You will probably run into some fsck problems, but that will hopefully be a one timer. I have only done the last approach one time myself on a 6.2-RC1 install - - so any second opinions from some more seasoned users would be grateful. Don't forget to study the man pages for bsdlabel and growfs - and do your backups. But it would give you a general idea of how your problems may be solved. /Anders -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) Comment: Grunbacher Altweizen Dunkel Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFhP1UMVyOPWVstbURAgYRAKCikpLatgEUq5L1bDOccUOf21wrfACfT/YJ gu41y+tiHOnNyn4yJk2/9pc= =alP4 -----END PGP SIGNATURE-----