Bug 24772

Summary: df and du provide conflicting data
Product: Base System Reporter: adsouza <adsouza>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description adsouza 2001-02-01 04:20:03 UTC
I have a 300MB partition for /var and df claims that it has only 20 MB free but when I run du -s . inside /var it shows only 130MB used.
This is rather alarming as I am now unsure of my filesystem integrity.
Comment 1 Neil Blakey-Milner 2001-02-01 09:14:29 UTC
On Wed 2001-01-31 (20:17), adsouza@math.uwaterloo.ca wrote:
> >Number:         24772
> >Category:       bin
> >Synopsis:       df and du provide conflicting data
> >Severity:       serious
> >Priority:       high
> >Description:
> I have a 300MB partition for /var and df claims that it has only 20 MB
> free but when I run du -s . inside /var it shows only 130MB used.
> This is rather alarming as I am now unsure of my filesystem integrity.

You probably have a largish log file or two that are open, and were on
/var, and were deleted.  Try killall -HUP syslogd, and other similar log
file consumers, and see if it continues to be out of sync.

du and df don't have to correlate - they do different things.

Neil
-- 
Neil Blakey-Milner
nbm@mithrandr.moria.org
Comment 2 dwmalone freebsd_committer freebsd_triage 2001-02-01 10:36:02 UTC
State Changed
From-To: open->closed

As pointed out by Neil df and du don't have to agree if 
a process still has a deleted file open.