우분투 리눅스 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