Why do “df” and “du” display different used space values on an LVM volume? [closed]

StackOverflow https://stackoverflow.com/questions/13081888

  •  14-07-2021
  •  | 
  •  

سؤال

[root@local ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      524G  465G   32G  94% /
/dev/sda1              99M   13M   82M  14% /boot
tmpfs                  18G     0   18G   0% /dev/shm
[root@local ~]# du -hs /
57G /

Why the show is not the same, but I did not use so much space.

هل كانت مفيدة؟

المحلول

Chances are that you deleted a file that was still being written to. While it won't be picked up by du (it only looks at files that still 'exist"), df will notice the missing free space. Try a lsof | grep deleted

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top