From owner-freebsd-questions@FreeBSD.ORG Fri Feb 12 23:53:56 2010 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 86A7A1065676 for ; Fri, 12 Feb 2010 23:53:56 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.123]) by mx1.freebsd.org (Postfix) with ESMTP id 4AFBF8FC1B for ; Fri, 12 Feb 2010 23:53:56 +0000 (UTC) X-Authority-Analysis: v=1.0 c=1 a=Vlc2lysBGdUA:10 a=pGLkceISAAAA:8 a=VhpN4ANDhz0fpJ_iCqYA:9 a=NsUhH3ukAYu3Pb_-hRkA:7 a=aR9m30Im1zXdHMf2bhT5ksnpPW0A:4 a=MSl-tDqOz04A:10 a=ZRFhQTycd0c-7dx3:21 a=6jLqNjUv4lbbZais:21 X-Cloudmark-Score: 0 X-Originating-IP: 76.184.157.127 Received: from [76.184.157.127] ([76.184.157.127:59547] helo=[10.0.0.3]) by cdptpa-oedge02.mail.rr.com (envelope-from ) (ecelerity 2.2.2.39 r()) with ESMTP id C3/B7-02874-31AE57B4; Fri, 12 Feb 2010 23:53:55 +0000 Date: Fri, 12 Feb 2010 17:53:54 -0600 From: Paul Schmehl To: Fernan Aguero , freebsd-questions@freebsd.org Message-ID: <0CA646C8F9505B3677DCFBA7@Macintosh-2.local> In-Reply-To: <520894aa1002121239s2148ed6dudeae8055fe337d02@mail.gmail.com> References: <520894aa1002121239s2148ed6dudeae8055fe337d02@mail.gmail.com> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: Re: discrepancies in disk usage between df and du X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Schmehl List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Feb 2010 23:53:56 -0000 You have a file locking problem. du shows disk in use, but df shows disk committed. Use lsof to identify the file that has disk space reserved but no longer exists. man (8) lsof --On February 12, 2010 5:39:44 PM -0300 Fernan Aguero wrote: > Hi, > > I have a box (7.2-STABLE, amd64) that is currently showing some disk > usage problems. It all started with apache generating huge logs from > one of the mod_perl applications that is undergoing testing. So the > /var partition was getting full. > > We removed all logs that were causing the problem, but even though du > shows some 700 Mb of usage, df shows that the disk is full (-1.5 Gb): > > [fernan@omega ~] sudo du -hc -d1 /var/ > Password: > 2.0K /var/.snap > 423M /var/account > 6.0K /var/at > 2.0K /var/audit > 18K /var/backups > 4.0K /var/crash > 6.0K /var/cron > 53M /var/db > 2.0K /var/empty > 2.0K /var/heimdal > 219M /var/log > 14M /var/mail > 4.0K /var/msgs > 48K /var/named > 2.0K /var/preserve > 44K /var/run > 2.0K /var/rwho > 16K /var/spool > 76K /var/tmp > 24K /var/yp > 2.0K /var/games > 710M /var/ > 710M total > > [fernan@omega ~] df -h > Filesystem Size Used Avail Capacity Mounted on > /dev/mirror/gm0s1f 18G 18G -1.5G 109% /var > > I've been googling around, and I understand why df and du might be > reporting disk usage differently. However, I can't solve this issue > and reclaim unused disk space ... applications (apache, mod_perl) are > prevented to write to /var and this is causing us problems. > > We've already tried rebooting the box, restarting the syslog, > newsyslog daemons, to no avail. df keeps showing >100% disk usage > (-1.5 Gb of remaining disk space) in all cases. We've even rebooted > the box with all apache instances turned off in rc.conf ... i.e. > without any but the most basic services running (sshd) ... > > This box is essentially a web server, no other services are being run. > > Any suggestions as to what to try next? > > Thanks in advance, Paul Schmehl, If it isn't already obvious, my opinions are my own and not those of my employer. ****************************************** WARNING: Check the headers before replying