NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Free space inconsistency with df / du



On Thu, Mar 27, 2008 at 04:07:34PM +0100, Jonathan Schleifer wrote:
> Hi.
> 
> df -h shows me that I have 3 GB used, while du -sh / shows me it's 2
> GB:
> 
> webkeks# df -h
> Filesystem    Size      Used     Avail Capacity  Mounted on
> /dev/wd0a     7.5G      3.0G      4.2G    41%    /
> kernfs        1.0K      1.0K        0B   100%    /kern
> webkeks# du -sh /
> 2.0G    /
> 
> Could anybody explain that to me? Does it mean I have file system
> errors and that the number of free blocks is wrong or something like
> this? Should I shut down that machine and do fsck? I want to avoid
> shutting it down if possible because it's a server (same for
> remounting / ro and doing fsck).

Do you have a process using a large file that has been deleted? du won't
show it. I've seen this crop up before when someone writes a log rotation
script that doesn't work properly :-)

Andrew


Home | Main Index | Thread Index | Old Index