![Centos 7,根目录几乎已满,已经尝试 du -shx 和 lsof | grep removed 但仍然找不到罪魁祸首](https://linux22.com/image/660017/Centos%207%EF%BC%8C%E6%A0%B9%E7%9B%AE%E5%BD%95%E5%87%A0%E4%B9%8E%E5%B7%B2%E6%BB%A1%EF%BC%8C%E5%B7%B2%E7%BB%8F%E5%B0%9D%E8%AF%95%20du%20-shx%20%E5%92%8C%20lsof%20%7C%20grep%20removed%20%E4%BD%86%E4%BB%8D%E7%84%B6%E6%89%BE%E4%B8%8D%E5%88%B0%E7%BD%AA%E9%AD%81%E7%A5%B8%E9%A6%96.png)
我们使用的是 centos 7,为 root 分配了 50G。空间不足,因为 df 报告说使用了 45G(90%)。但当我尝试查找占用空间的内容时,du 仅显示使用了不到 10G。我还尝试使用 lsof 查找大型已删除文件(如另一个已解决线程所建议的那样),但仍然一无所获。以下是 df、du 和 lsof 命令的输出。请就我下一步该怎么做提供建议。
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 50G 45G 5,3G 90% /
devtmpfs 1,9G 0 1,9G 0% /dev
tmpfs 1,9G 0 1,9G 0% /dev/shm
tmpfs 1,9G 103M 1,8G 6% /run
tmpfs 1,9G 0 1,9G 0% /sys/fs/cgroup
/dev/mapper/centos-home 412G 5,6G 406G 2% /home
/dev/sda1 497M 158M 339M 32% /boot
tmpfs 1,9G 103M 1,8G 6% /var/named/chroot/run/named
du -hsx * | sort -rh | head -10
du: cannot access ‘proc/10910/task/10910/fd/4’: No such file or directory
du: cannot access ‘proc/10910/task/10910/fdinfo/4’: No such file or directory
du: cannot access ‘proc/10910/fd/4’: No such file or directory
du: cannot access ‘proc/10910/fdinfo/4’: No such file or directory
5,6G home
1,7G usr
542M var
133M boot
103M run
26M etc
19M root
12K tmp
0 sys
0 srv
lsof | grep "deleted"
tuned 749 root 6u REG 253,1 4096 196293 /tmp/ffiX1PEcV (deleted)
gmain 749 908 root 6u REG 253,1 4096 196293 /tmp/ffiX1PEcV (deleted)
tuned 749 909 root 6u REG 253,1 4096 196293 /tmp/ffiX1PEcV (deleted)
tuned 749 910 root 6u REG 253,1 4096 196293 /tmp/ffiX1PEcV (deleted)
tuned 749 911 root 6u REG 253,1 4096 196293 /tmp/ffiX1PEcV (deleted)