Bug 36701

Summary: "df" shows a status (wrong) that differs from "du"'s status
Product: Base System Reporter: Cecilia Cabrera <ccabrera>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.4-RELEASE   
Hardware: Any   
OS: Any   

Description Cecilia Cabrera 2002-04-03 19:50:00 UTC
     The daily output's Disk status showed that the /var used space increased daily. This isn't usally so, since we have logs, it increases 1-2 % daily for a couple of days and then (when ziped) decreases back to the original size. When running df -k or df -h we got this result too, something like this:

Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/ad0s1a   1372527   928151   334574    74%    /
/dev/ad0s1e    372079   110213   232100    32%    /var
procfs              4        4        0   100%    /proc

but when doing:

#du -ks /var:

65982   /var

(which doesn't match!!) <--- this is the one that's right


Not knowing how to solve this, we used the "solution windows": rebooted. Now they're ok, they both show:
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/ad0s1a   1372527   928357   334368    74%    /
/dev/ad0s1e    372079    66073   276240    19%    /var
procfs              4        4        0   100%    /proc

#du -ks /var/
66070   /var/

How-To-Repeat: just sit and wait, it happended a couple of times.
Comment 1 Maxim Konovalov freebsd_committer freebsd_triage 2002-04-03 20:17:38 UTC
State Changed
From-To: open->closed

It is a FAQ. Please take a look at 

http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#DU-VS-DF