首先获得一个已经被删除的仍然被应用程序占用的文件列表

[root@iZ8vb9jxt04jd9wta6lcsmZ daikuancrm]# lsof |grep deleted
nginx     16243          root    7w      REG              253,1    73294045    1324125 /.Recycle_bin/_bt_www_bt_wwwlogs_bt_11.com.log_t_1711859911.6571527 (deleted)
nginx     16243          root    9w      REG              253,1 11504734251    1325678 /.Recycle_bin/_bt_www_bt_wwwlogs_bt_39.103.174.145.log_t_1711859903.273371 (deleted)
nginx     16244           www    7w      REG              253,1    73294045    1324125 /.Recycle_bin/_bt_www_bt_wwwlogs_bt_11.com.log_t_1711859911.6571527 (deleted)
nginx     16244           www    9w      REG              253,1 11504734251    1325678 /.Recycle_bin/_bt_www_bt_wwwlogs_bt_39.103.174.145.log_t_1711859903.273371 (deleted)
nginx     16245           www    7w      REG              253,1    73294045    1324125 /.Recycle_bin/_bt_www_bt_wwwlogs_bt_11.com.log_t_1711859911.6571527 (deleted)
nginx     16245           www    9w      REG              253,1 11504734251    1325678 /.Recycle_bin/_bt_www_bt_wwwlogs_bt_39.103.174.145.log_t_1711859903.273371 (deleted)
nginx     16246           www    7w      REG              253,1    73294045    1324125 /.Recycle_bin/_bt_www_bt_wwwlogs_bt_11.com.log_t_1711859911.6571527 (deleted)
nginx     16246           www    9w      REG              253,1 11504734251    1325678 /.Recycle_bin/_bt_www_bt_wwwlogs_bt_39.103.174.145.log_t_1711859903.273371 (deleted)
php-fpm   16845           www    3u      REG              253,1           0    1185477 /tmp/.ZendSem.PaGbdg (deleted)
php-fpm   16846           www    3u      REG              253,1           0    1185477 /tmp/.ZendSem.PaGbdg (deleted)
php-fpm   16847           www    3u      REG              253,1           0    1185477 /tmp/.ZendSem

查看应用:

[root@iZ8vb9jxt04jd9wta6lcsmZ daikuancrm]# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      1204/redis-server 1 
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      16243/nginx: master 
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      15134/pure-ftpd (SE 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2008/sshd           
tcp        0      0 0.0.0.0:888             0.0.0.0:*               LISTEN      16243/nginx: master 
tcp        0      0 0.0.0.0:8888            0.0.0.0:*               LISTEN      2029/python         
tcp6       0      0 :::3306                 :::*                    LISTEN      6951/mysqld         
tcp6       0      0 :::21                   :::*                    LISTEN      15134/pure-ftpd (SE

解决方案:

可以kill -9 pid 杀掉相关进程,或者重启进行的相关应用

发表评论

邮箱地址不会被公开。 必填项已用*标注