From owner-freebsd-questions@FreeBSD.ORG Wed Jan 7 02:29:18 2004 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 1045616A4CE for ; Wed, 7 Jan 2004 02:29:18 -0800 (PST) Received: from munk.nu (mail.munk.nu [213.152.51.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A92443D2D for ; Wed, 7 Jan 2004 02:29:16 -0800 (PST) (envelope-from munk@munk.nu) Received: from munk by munk.nu with local (Exim 4.24; FreeBSD) id 1AeAw3-000115-OG; Wed, 07 Jan 2004 10:29:11 +0000 Date: Wed, 7 Jan 2004 10:29:11 +0000 From: Jez Hancock To: Dino Vliet Message-ID: <20040107102911.GA3312@users.munk.nu> Mail-Followup-To: Dino Vliet , freebsd-questions@freebsd.org References: <200401070526.KAA22696@manage.24online> <20040107093835.37200.qmail@web40110.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040107093835.37200.qmail@web40110.mail.yahoo.com> User-Agent: Mutt/1.4.1i cc: freebsd-questions@freebsd.org Subject: Re: Size of /var worries me 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: Wed, 07 Jan 2004 10:29:18 -0000 On Wed, Jan 07, 2004 at 01:38:35AM -0800, Dino Vliet wrote: > Hi there, > > I've installed freebsd 4.9 and am currently busy with > installing third party apps through the ports > collection. > What worries me however is the size of my /var > directory. You might consider symlinking /var to /usr/var perhaps - unless you have any other spare space that you can allocate to the /var fs - 67MB is quite small, especially if you intend to use any databases at any point in time. The best way to go about symlinking /var to somewhere else is to go into single user mode at boot time (or kill all processes that use anything under /var), move /var to /usr/var and then symlink /var to /usr/var. This isn't really the best solution in terms of performance (although you wouldn't notice on a low load system), but unless you have extra free disk space you can allocate to /var or are prepared to reinstall - allocating more space to /var in the installation - then the symlinking option is viable. > I also had to get rid of a pkg.db file in the > /var/db/pkg directory because it took a lot of space. As a note, the pkg.db file is quite important - port installations register themselves in the /var/db/pkg/pkg.db database and this is used to check on dependencies etc, a little bit like the windows registry is used (only a little!). Generally deleting files from under /var isn't the best solution :P > q1) Do I have to worry about my /var q2) How can I get rid of files I don't need (like > XFree86.0.log..) As mentioned above it's generally not a good idea to delete files from /var/ on an ad-hoc basis. A better plan: organize a logfile rotation policy so that old logfiles are rotated out of /var/log into a backup location which has enough space. See the manpage on newsyslog for info on this. configure daemons so that they only log what is absolutely necessary for your needs. -- Jez Hancock - System Administrator / PHP Developer http://munk.nu/ http://jez.hancock-family.com/ - personal weblog http://ipfwstats.sf.net/ - ipfw peruser traffic logging