From owner-freebsd-questions@FreeBSD.ORG Fri Feb 12 21:10:04 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 4D477106566C for ; Fri, 12 Feb 2010 21:10:04 +0000 (UTC) (envelope-from fernan.aguero@gmail.com) Received: from mail-px0-f176.google.com (mail-px0-f176.google.com [209.85.216.176]) by mx1.freebsd.org (Postfix) with ESMTP id 1E73A8FC17 for ; Fri, 12 Feb 2010 21:10:03 +0000 (UTC) Received: by pxi6 with SMTP id 6so2892564pxi.14 for ; Fri, 12 Feb 2010 13:10:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=mttOLu35LhJuOUc4+Na1h9I8bkpHv7O2GZG9Kq/66oI=; b=ZsFJk0WLPbmMoutmzDp7Yayj7iC0kcl9dFo7EpSIOoI3IRPkLxxesyuDH3qCDUqzkR UkweSsgnSgYvF8b39nUPnObhbuCwb6U1Df/wHBtqD169UtJ1porCFqt2h3oindQKUcBd Mz5/+YzGXVDkXj+iwIGJUBcKmwG4Ci7QhP6WI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=mQP19XaQ7xalTMlf8wlJu5ZXhY7SEV51jm/qK93OiycNO57idCce6JcbKIE6CXxb6E 1z/c+dxorlFku1ZH3PyXHQcy3dM0tm7tzmUK1KeSr+MTHQZP8XDXYiQhbeT+t1MDL1KZ 6m1cBbuAl1ZqB+wLCqN4/AXcq99dBxfzks/rw= MIME-Version: 1.0 Received: by 10.142.248.9 with SMTP id v9mr1255722wfh.308.1266007204075; Fri, 12 Feb 2010 12:40:04 -0800 (PST) From: Fernan Aguero Date: Fri, 12 Feb 2010 17:39:44 -0300 Message-ID: <520894aa1002121239s2148ed6dudeae8055fe337d02@mail.gmail.com> To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: discrepancies in disk usage between df and du 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: Fri, 12 Feb 2010 21:10:04 -0000 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, -- fernan