今天发现一台varnish服务器的/空间满了,于是要清空无用的文件,当我删除文件后,df �Ch之后发现可用空间没有变化。
经过排查,发现/etc/init.d/varnishncsa stop之后,后台还是有varnishncsa进程占用,导致删除的文件没有得到释放,导致/分区依然报磁盘空间不足
[root@centos6192168245052 nginx]# ps -ef|grep varnish
root 1645 1 0 Aug21 ? 00:07:35 /usr/bin/varnishncsa -a -w/var/log/varnish/varnishncsa.log -D -P /var/run/varnishncsa.pid
root 2976 1 0 Jul15 ? 00:00:17 /usr/sbin/varnishd -P/var/run/varnish.pid -a :80 -f /etc/varnish/two.vcl -T 127.0.0.1:6082 -t 120 -w1,4000,120 -u varnish -g varnish -S /etc/varnish/secret -s malloc,8G
varnish 2977 2976 16 Jul15 ? 6-05:28:02 /usr/sbin/varnishd -P/var/run/varnish.pid -a :80 -f /etc/varnish/two.vcl -T 127.0.0.1:6082 -t 120 -w1,4000,120 -u varnish -g varnish -S /etc/varnish/secret -s malloc,8G
root 12472 1 0 Aug21 ? 00:13:26 /usr/bin/varnishncsa -a -w/var/log/varnish/varnishncsa.log -D -P /var/run/varnishncsa.pid
root 18853 1 0 Aug21 ? 00:12:25 /usr/bin/varnishncsa -a -w/var/log/varnish/varnishncsa.log -D -P /var/run/varnishncsa.pid
root 19929 1 0 Aug20 ? 00:20:43 /usr/bin/varnishncsa -a -w /var/log/varnish/varnishncsa.log-D -P /var/run/varnishncsa.pid
root 25448 23228 0 18:41 pts/2 00:00:00 grep varnish
root 26660 1 0 Aug21 ? 00:16:03 /usr/bin/varnishncsa -a -w/var/log/varnish/varnishncsa.log -D -P /var/run/varnishncsa.pid
root 31277 1 0 12:00 ? 00:03:20 /usr/bin/varnishncsa -a -w/var/log/varnish/varnishncsa.log -D -P /var/run/varnishncsa.pid
root 31988 1 0 05:00 ? 00:05:27 /usr/bin/varnishncsa -a -w/var/log/varnish/varnishncsa.log -D -P /var/run/varnishncsa.pid
解决办法:kiallall -9 /usr/bin/varnishncsa解决