From owner-freebsd-questions@FreeBSD.ORG Wed Mar 11 22:34:14 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45060106564A for ; Wed, 11 Mar 2009 22:34:14 +0000 (UTC) (envelope-from jamgill@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.169]) by mx1.freebsd.org (Postfix) with ESMTP id 15E208FC0A for ; Wed, 11 Mar 2009 22:34:14 +0000 (UTC) (envelope-from jamgill@gmail.com) Received: by wf-out-1314.google.com with SMTP id 27so227918wfd.7 for ; Wed, 11 Mar 2009 15:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=uffGfOs/epzqlmFXca7yqDR0OkkdEeHrgyT+6ZqEo9g=; b=KQvQ6/DRLf1aI86ay8XN60Ml+B0Rs3VzxU6ROXKwQjQCa8uWcC7Vf7CGje8d8558Yy D3JiWqRWkZL8Qk5tanwKnTtKyfcEdVwETo2JmOW5EVQAa28ensMTmBFfhNi1v4gQKP96 xX1HPdZlqILP/OPWn421fUcG6HYgfrPysbuuo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=kipMkapwezMflZG3x8Msnaj6+SeI0NozqhDeam1obu1n/T9FmbUk6VqFBHzfhgeXfU yQYyV52YK069CUrwFDqHj7kQoRTMBhvZygkJFnGMg1jKf6W5V/mVNwbpmJIWqShDYGcG sj8yruEtP4Ua2X2YxNxm1jzeumrp7z0vQ2v0Q= MIME-Version: 1.0 Received: by 10.142.246.19 with SMTP id t19mr3925113wfh.9.1236810853782; Wed, 11 Mar 2009 15:34:13 -0700 (PDT) In-Reply-To: <20090311195740.GA70853@osiris.chen.org.nz> References: <9da4e0e90903111130o71de8b54xc417b51c1aaf31dd@mail.gmail.com> <20090311190422.GA71253@darklight.homeunix.org> <9da4e0e90903111223j7549c28ak16c2d14739507992@mail.gmail.com> <20090311195740.GA70853@osiris.chen.org.nz> Date: Wed, 11 Mar 2009 18:34:13 -0400 Message-ID: <9da4e0e90903111534n35cfed99h1b5f5aeef3adee3f@mail.gmail.com> From: jamgill To: Jonathan Chen Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: reclaiming /var capacity? 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: Wed, 11 Mar 2009 22:34:14 -0000 On Wed, Mar 11, 2009 at 3:57 PM, Jonathan Chen wrote: > On Wed, Mar 11, 2009 at 03:23:50PM -0400, jamgill wrote: > > On Wed, Mar 11, 2009 at 3:04 PM, Yuri Pankov > wrote: > > > > > On Wed, Mar 11, 2009 at 02:30:08PM -0400, j. wrote: > > > > Where did my capacity go and how can I get it back? > > > > > > > > deathray# du -sh /var > > > > 70M /var > > > > > > > > > > > > deathray# df -h /var > > > > Filesystem Size Used Avail Capacity Mounted on > > > > /dev/da0d 248M 214M 15M 94% /var > > > > > > > > > > > > Thanks, > > > > > > > > --j. > > > > > > http://www.freebsd.org/doc/en/books/faq/disks.html#DU-VS-DF > > > > > > > > > > Thanks, Yuri. According to the FAQ you linked, wouldn't a good > smattering > > of "sync ; sync ; sync ; sync ; sync" cause the the two to reflect the > sizes > > accurately? > > This will do nothing if a process has an open file descriptor on a > deleted file. Use fstat(1) or lsof to help hunt down the offending > process. Thanks for the reply. This helped me solve my problem. fstat /var didn't show me anything interesting, but fstat -v var did indicate a bunch of "cant read vnode at 0x0 for pid ..." so i installed lsof and saw that httpd and mysqld had a lot more open files than I expected, and several of those were not open to a specific file but to /var (/dev/da0d) ... after restarting the services (i cheated, I rebooted) the space reported by du and df are now much closer. And, importantly, postfix knows it has some room to do its thing in the /var partition. Thanks again. > > -- > Jonathan Chen > ---------------------------------------------------------------------- > When all else fails, RTFM > -- "Build a man a fire, he'll be warm for a night... set a man on fire, he will be warm for the rest of his life"