为什么我的根目录只占用很少的空间却没有磁盘空间?

为什么我的根目录只占用很少的空间却没有磁盘空间?

我正在使用 Ubuntu Linux 16。我的磁盘空间不足......

[rails@server ~]$ df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/simfs       30G   29G  1.5G  96% /

但我不明白的是,当我得到“/”目录的总大小时,它显示小于 29G ...

[rails@server ~]$ sudo du -sh /
du: cannot access ‘/proc/883/task/883/fd/4’: No such file or directory
du: cannot access ‘/proc/883/task/883/fdinfo/4’: No such file or directory
du: cannot access ‘/proc/883/fd/4’: No such file or directory
du: cannot access ‘/proc/883/fdinfo/4’: No such file or directory
4.5G    /

这里发生了什么?更重要的是,我如何弄清楚所有这些神秘的磁盘空间都被用在了哪里?

编辑:

按照 GracefulRestart 的要求输出...

[rails@server ~]$ sudo lsof -nP 2>&1 | grep 'deleted'
postmaste  443      postgres  mem       REG              144,4           147159237 (deleted)/dev/zero (stat: No such file or directory)
postmaste  443      postgres  mem       REG              144,4                   0 (deleted)/VE20428-SYSV0052e2c1 (stat: No such file or directory)
postmaste  469      postgres  mem       REG              144,4           147159237 (deleted)/dev/zero (stat: No such file or directory)
postmaste  469      postgres  mem       REG              144,4                   0 (deleted)/VE20428-SYSV0052e2c1 (stat: No such file or directory)
postmaste  470      postgres  mem       REG              144,4           147159237 (deleted)/dev/zero (stat: No such file or directory)
postmaste  470      postgres  mem       REG              144,4                   0 (deleted)/VE20428-SYSV0052e2c1 (stat: No such file or directory)
postmaste  471      postgres  mem       REG              144,4           147159237 (deleted)/dev/zero (stat: No such file or directory)
postmaste  471      postgres  mem       REG              144,4                   0 (deleted)/VE20428-SYSV0052e2c1 (stat: No such file or directory)
postmaste  472      postgres  mem       REG              144,4           147159237 (deleted)/dev/zero (stat: No such file or directory)
postmaste  472      postgres  mem       REG              144,4                   0 (deleted)/VE20428-SYSV0052e2c1 (stat: No such file or directory)
httpd     1130          root  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1130          root  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131        apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131        apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1133   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1133   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1134   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1134   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1135   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1135   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1136   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1136   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1137   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1137   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1138   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1138   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1139   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1139   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1140   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1140   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1141   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1141   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1142   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1142   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1143   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1143   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1144   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1144   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1145   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1145   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1146   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1146   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1147   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1147   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1148   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1148   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1131 1149   apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1131 1149   apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1132        apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1132        apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
httpd     1158        apache  mem       REG              144,4           147485837 (deleted)/dev/zero (stat: No such file or directory)
httpd     1158        apache  mem       REG              144,4               65537 (deleted)/VE20428-SYSV0176748a (stat: No such file or directory)
postmaste 1270      postgres  mem       REG              144,4           147159237 (deleted)/dev/zero (stat: No such file or directory)
postmaste 1270      postgres  mem       REG              144,4                   0 (deleted)/VE20428-SYSV0052e2c1 (stat: No such file or directory)

编辑2:这是第二个命令的输出......

[rails@server ~]$ sudo du -h --max-depth=1 /; ls -plah / | grep -v /
214M    /opt
4.0K    /media
12K /boot
6.7M    /run
4.0K    /lost+found
du: cannot access ‘/proc/3478/task/3478/fd/4’: No such file or directory
du: cannot access ‘/proc/3478/task/3478/fdinfo/4’: No such file or directory
du: cannot access ‘/proc/3478/fd/4’: No such file or directory
du: cannot access ‘/proc/3478/fdinfo/4’: No such file or directory
0   /proc
4.0K    /dev
4.0K    /.cpt_hardlink_dir_a920e4ddc233afddc9fb53d26c392319
114M    /tmp
0   /sys
14M /etc
3.6M    /root
396M    /home
12K /.rbenv
4.0K    /srv
1.9G    /usr
1.9G    /var
8.0K    /mnt
4.5G    /
total 64K
-rw-r--r--  1 root root    0 May  5  2018 .autorelabel
-rw-r--r--  1 root root    0 Nov  8 17:14 reboot
-rw-r--r--  1 root root    0 Nov  8 17:15 .vzfifo

相关内容