From owner-freebsd-questions@FreeBSD.ORG Sun Dec 17 20:36:21 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 EB2A116A407 for ; Sun, 17 Dec 2006 20:36:21 +0000 (UTC) (envelope-from list@museum.rain.com) Received: from ns.umpquanet.com (ns.umpquanet.com [63.105.30.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BCFF43CA5 for ; Sun, 17 Dec 2006 20:36:20 +0000 (GMT) (envelope-from list@museum.rain.com) Received: from ns.umpquanet.com (localhost [127.0.0.1]) by ns.umpquanet.com (8.13.8/8.13.8) with ESMTP id kBHKaTPo081390; Sun, 17 Dec 2006 12:36:29 -0800 (PST) (envelope-from list@museum.rain.com) Received: (from james@localhost) by ns.umpquanet.com (8.13.8/8.13.8/Submit) id kBHKaTxI081389; Sun, 17 Dec 2006 12:36:29 -0800 (PST) (envelope-from list@museum.rain.com) Date: Sun, 17 Dec 2006 12:36:29 -0800 From: James Long To: freebsd-questions@freebsd.org, Bradley Giesbrecht Message-ID: <20061217203629.GA79172@ns.umpquanet.com> References: <20061217120040.9EF0316A607@hub.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061217120040.9EF0316A607@hub.freebsd.org> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: 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 20:36:22 -0000 > Date: Sat, 16 Dec 2006 23:31:58 -0800 > From: Bradley Giesbrecht > Subject: var out of space > To: freebsd-questions@freebsd.org > Message-ID: <00190780-C6FE-42DB-9AD8-5D985625545F@pixilla.com> > Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed > > 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? Here is a slightly simpler solution than what Anders proposed that may work for you. Find out which sub-directories of /var are the disk space consumers: du -d1 /var | sort -rn | head That will list the top ten. This method assumes you have only one or two large directories, and that moving them would yield a substantial reduction in /var disk space usage. Let's assume that /var/log and /var/db are the top two directories. Shutdown to single-user mode. Stop any daemons like syslog, sendmail, etc. that might write to /var/log or /var/db, since you will be working with those two directories. cd into /var and move the log sub-directory onto the /usr mount point, and then create a symlink to make /var/log redirect to the new location on /usr: cd /var mv log /usr/var-log ln -s /usr/var-log log Repeat for /var/db: mv db /usr/var-db ln -s /usr/var-db db Reboot. This procedure eliminates the need to mess with your disklabel or your fstab. BTW, it looks like your / partition is a bit crowded, also. :) Jim