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

Re: [TCLUG:16067] problems with df/du mismatch



We have 3 distinct apache processes running (/usr/local/apache, apache2,
apache3) as a workaround for the limitations on file handles/process.  I
do remember restarting apache2, which had one of the 300MB logfiles. 
I'll try restarting the others and see if that fixes it though.

Chris McKinley wrote:
> 
> That is because you did not restart the apache process.  Until you do that,
> there is a valid reference to those files in memory[1], even though there is
> no inode entry in the directory.  So du will not see it, but df will.
> 
> -Chris McKinley
> 
> [1] See any UNIX kernel book, a good one is "Design and Implementation of 4.4
> BSD"
> 
> On Wed, 12 Apr 2000, Adam Maloney wrote:
> 
> > 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?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org

-- 
Adam Maloney
Systems Administrator
Internet Exposure, Inc.