Андрей Василишин wrote:
> Thanks for your reply.
> If you watched my first message, you can see difference between df and du
> used space  237G vs 24G. There are no open deleted files. If I unmount this
> filesystems and do fsck, du and df will show the same used space.

I did read your message but honestly I assumed it was deleted files
since that is the most common problem.  The FAQ covers that case
specifically and therefore that seemed like the mostly likely reason.

This is unlikely to actually be a df or du problem since those simply
sum up the result of kernel system calls.  If the kernel is returning
correct data then those utilities return correct information.  If not
then the underlying system calls would be to blame.

If you can recreate this problem again (since you said they are now
the same again) then try using strace to record what the underlying
system calls returned.

  strace -v -o df.strace.out df -H

  strace -v -o du.ms1.strace.out du -hs /megastorage1

The files produced will record the raw system call data.  For df that
is relatively simple to work with directly.  For du it will be at
least one stat for every file it is summing and will need something to
sum up the raw data such as an awk, perl, python or other script.  But
that would show that the utilties are producing the correct
information given the raw data they are receiving from the kernel
system calls.

Bob

Reply via email to