Home > OS >  Ubuntu 4.8.2, hard disk space is full, but can not find out which directory, or file is larger
Ubuntu 4.8.2, hard disk space is full, but can not find out which directory, or file is larger

Time:04-20

Root @ node11:/# df -h
The Filesystem Size, informs the Avail Use % Mounted on
/dev/vda1 40 G 32 G 5.9 G 85%/
None 4.0 K 0 0% 4.0 K/sys/fs/cgroup
Udev 16 g 4.0 K 16 g 1%/dev
TMPFS 3.2 G 3.2 G 1% 380 k/run
None 5.0 M 5.0 M 0 0%/run/lock
None 16 g 0 0%/run/16 g SHM
None of 100 m 0 100 m 0%/run/user

Using the 32 gb space, but in the root directory, execute
Root @ node11:/# du - sh * | sort - hr
Du: always access the/proc/28050/task/28050/fd/4 ': No to the file or directory
Du: always access the/proc/28050/task/28050/fdinfo/4 ': No to the file or directory
Du: always access 'proc/28050/fd/4: No to the file or directory
Du: always access 'proc/28050/fdinfo/4: No to the file or directory
2.6 G cache
1.1 G var
1.1 G usr
486 m home
469 m lib
78 m MNT
62 m boot
,,,,,,,,

These directories, add up, and no 32 gb?

The root directory, there is no hidden files, the following
Root @ node11: #/ls -a
. The boot etc initrd. Img. Old lost + found opt run sys var
. Cache home lib media proc sbin TMP called
Bin dev initrd. Img lib64 MNT root the SRV usr called the old

How to find what directory and/or file is bigger?





CodePudding user response:

Had to restart the machine?

CodePudding user response:

Uh huh, restart the machine or in the use of services and have a look, may have been deleted, but did not release

CodePudding user response:

If it is not convenient to restart, lsof | grep del if there is a large file or delete the content of large quantities of small files

CodePudding user response:

The lsof | grep DEL # DEL to uppercase

CodePudding user response:

reference yolyry reply: 3/f
if it is not convenient to restart, lsof | grep del if there is a large file or delete the content of large quantities of small files


No reboot the machine; Lsof | grep DEL results of 11 lines,

Root @ node11:/# lsof | grep DEL | wc -l
82

Specific information such as
1043 1045 nobody NSCD DEL REG 253, 1 78
6575 - the gnu/Linux/lib/x86_64 - libpcre. So. 3.13.1

It seems that the 82 line information file, not;
Need to put these find 82 lines of the file, delete? How to delete?




CodePudding user response:

No reboot the machine; There are 82 rows lsof | grep DEL results,

CodePudding user response:

The lsof -n | grep does
See if there are any information, if there is a larger file, what process is in the occupied, if you can
Kill 9 PID # kill process, is deleted

CodePudding user response:

Common df and du inconsistencies is file deleted process and handle the problems caused in
When a file is deleted, in a file system directory is no longer visible, so du is not statistical it again; However if the and running process to hold the handle to the file has been deleted, so this file will not be deleted in the disk, the information in the partition superblock won't change, so the df will continue to statistics the deleted files

CodePudding user response:

Look at the output
 cat/proc/1/cgroup 

CodePudding user response:

my great god reply: 666, 9/f, reference
look at the output
 cat/proc/1/cgroup 



Root @ node11: ~ # cat/proc/1/cgroup
2: name=systemd:/



CodePudding user response:

The
reference 7 floor yolyry response:
lsof -n | grep does
See if there are any information, if there is a larger file, what process is in the occupied, if you can
Kill 9 PID # kill the process, he deleted


Root @ node11: ~ # lsof - n | grep does | wc -l
14740

See that 14740 files, basically all is a small file;

How to delete?

  • Related