TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problems with df/du mismatch



One of my machines generated a bunch of apache logfiles and the
partition became 100% full.  I moved the logfiles to a different machine
and removed them.  The logfiles were 300MB each (2 of them), the
partition is about 3Gb total.  After I removed them I did a DF, and the
partition still showed up as 100% in use.  I removed a smaller 30MB file
and brought the usage down to 99%.

When I do a DU from /usr, I see: 2193978	.  That tells me that DU sees
2,193,978 bytes in use for the whole partition.  When I do a df, I see:
/dev/sda8            2971111 2800051    17410     99%   /usr

So df thinks that there's 2,800,051 bytes in use.

Incidentally, before I deleted the 30MB logfile (after removing the 2
300MBers and having df say it was still 100% full) I tried to write a
file and got the no space left on device message.  So I assume that when
the 17MB that's currently free gets used up by the end of the day
tomorrow Linux is going to think the partition is full.

Do I need to unmount the partition and fsck to fix the mismatch?

-- 
Adam Maloney
Systems Administrator
Internet Exposure, Inc.