On Sat, 16 Aug 2008, Ward Poelmans wrote:
> On Sat, Aug 16, 2008 at 07:50,  <[EMAIL PROTECTED]> wrote:
> 
> > the difference between du and df is about 640 - 188 = 452 MB.
> > and "df" is showing  that my root is full  2.4 times more than "du".
> >
> > which one is the correct one? I've another server that this
> > difference is about 7 GiG and on that server root is 80% full. The
> > type of partition is ext3.
> 
> Next to the difference due journaling etc, there is one important
> difference between du en df:
> deleted files held open by a running process. du doesn't count these
> files, df does.
> You can find those files with lsof | grep "deleted". Try closing the
> process with deleted files and suddenly your du en df will give the
> same free diskspace.
> Ofcourse, a reboot does also the trick.
> 
> Ward


Actually, there is one more way to hide a file from du

If there is a file in the /var directory *BEFORE* the /var partition is 
mounted onto the directory, then du won't find it, but df will know 
about the space it is using.

You will probably need to boot from a live CD of some sort to be able to 
umount the partitions and check the underlying directory, but it might 
be worth it there is still space unaccounted for after a reboot.


-- 
Reverend Paul Colquhoun, ULC.    http://andor.dropbear.id.au/~paulcol
     Asking for technical help in newsgroups?  Read this first:
        http://catb.org/~esr/faqs/smart-questions.html#intro

Reply via email to