0

Here is my df -g output:

df -g /var
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd9var        3.50      0.10   98%     6376     18% /var

But if a enter in the mount point and issue du command, I get the following output

ux-zzz02:/var>du -sm .
374.38  .
ux-zzz02:/var>

How can this happen? I have only 374mb being used but df command says it's used 98% of 3.50gb

Astora
  • 439

2 Answers2

1

"lsof" is all that you need....

lsof | grep -i delete

The output will show you if some file(s) still in use have been deleted.

Regards

Romeo Ninov
  • 17,484
Alberto
  • 505
1

Do you have mount points inside /var?

When you mount something on a directory it does not matter if the directory is empty or not, it just mounts what you told it to mount. According to this you may have mounted something on a directory which was not empty and have a lot of files or just a few files that occupy a lot of space. Using du won't take into account those files since it will only see the files on the mounted fs, and that may be the "unjustified" discrepancy between those two commands.

Try unmounting those directories and checking if you have files there.

YoMismo
  • 4,015