Page 1 of 1

command df and du reports different output

Posted: 2020/09/04 15:08:02
by ludaca
Hello,

CentOS Linux release 7.4.1708 (Core)
df -k /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/centos-root 291533568 238124656 53408912 82% /

du -sh /
6.5G

Already run lsof - no "dead" files.
System rebooted - unchanged.

Any help will be appreciated.
Thanks in advance

Re: command df and du reports different output

Posted: 2020/09/04 16:23:07
by TrevorH
Step 1: run yum update. Your system is over 3 years out of date. The current version is 7.8.

Post all of the output from df -m

Re: command df and du reports different output

Posted: 2020/09/05 10:36:06
by ludaca
performed yum update and sysrtem reboot

more /etc/centos-release
CentOS Linux release 7.8.2003 (Core)

df -m
Filesystem 1M-blocks Used Available Use% Mounted on
devtmpfs 257830 0 257830 0% /dev
tmpfs 257842 0 257842 0% /dev/shm
tmpfs 257842 10 257832 1% /run
tmpfs 257842 0 257842 0% /sys/fs/cgroup
/dev/mapper/centos-root 284701 232800 51902 82% /
/dev/sda2 1016 223 794 22% /boot
/dev/sda1 200 12 189 6% /boot/efi
tmpfs 51569 0 51569 0% /run/user/0

Re: command df and du reports different output

Posted: 2020/09/05 18:14:18
by ludaca
Resolved.
Removed /var/lib/docker/* and rebooted.
Thanks for referring to my post.

Re: command df and du reports different output

Posted: 2020/09/07 10:07:25
by tunk
I guess that "df -k /" only shows the root file system, and
"du -sh /" includes all files, directories and file systems.