On Thu, Sep 15, 2016 at 12:04:06AM +0300, Андрей Василишин wrote:
Package: coreutils
Version: 8.23-4

Hello!
Usually df -h and du -hs shows the same used space. But now I have a problem. I am using two SSD for a cache. Script all time writes and deletes files.

df -H
/dev/sdc1          237G         178G   47G           80% /megastorage1
/dev/sdb1          237G         177G   48G           79% /megastorage2

du -hs /megastorage1
24G     /megastorage1

du -hs /megastorage2
23G     /megastorage2


mount | grep megastorage
/dev/sdc1 on /megastorage1 type ext4 (rw,noatime,data=ordered)
/dev/sdb1 on /megastorage2 type ext4 (rw,noatime,data=ordered)

The first thing that comes to mind is that something has a file open, which was later deleted. Such a deleted file will not show up in du because it can't be listed, but the blocks the file is using will still be reported by df. If you have the lsof command installed (apt-get install lsof) you can try something like lsof | grep -i del | grep /megastorage
to identify deleted files and the process which has it open.

Mike Stone

Reply via email to