Host disk space is not a problem when you can not release the restart, temporary treatment

Before meeting disks df -h and du -sh * Check the file size inconsistent results, this happens, there are two general reasons:

1. There are hidden files

2. Disk space is not released (deleted file is being used process, so linux file system thinks there is no space for them to be released . )

 

 Solutions:

lsof | grep deleted to find unreleased process, column 7 field for the size of the file, find the file occupies the largest process $ {PID}

  

/ Proc / $ {PID} / fd f- This is a directory that contains the current process open file descriptors of each file

Into the / proc / $ {PID} / fd and ll | grep deleted to find the corresponding descriptor ID to free up disk space is then emptied,

 

 

Note: This method is only temporary free disk space, process and it may not kill either be the presence of the disk is occupied, only the process where the service will restart the process is killed completely released

Guess you like

Origin www.cnblogs.com/rockstics/p/11387209.html