df查看根目录磁盘空间爆满
[root@lnx-a-27 logs]# df
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/sda2 41284928 0 41284928 100% /
tmpfs 1962324 0 1962324 0% /dev/shm
/dev/sda1 516040 59236 430592 13% /boot
/dev/sda5 1542096 35072 1428688 3% /data
在根目录下查看空间占用,只占了10G
猜想应该在删除文件后没有释放空间
使用 lsof|grep deleted
可以看到有一堆的deleted状态的文件
[root@lnx-air-9-27 /]# lsof|grep deleted
vmtoolsd 1110 root 5u REG 8,2 9341 1703941 /tmp/vmware-root/appLoader-1110.log (deleted)
java 3873 root 1w REG 8,2 8283185468 661954 /home/tester/zookeeper/logs/zookeeper.out (deleted)
java 3873 root 2w REG 8,2 8283185468 661954 /home/tester/zookeeper/logs/zookeeper.out (deleted)
java 11059 tester 1w REG 8,2 2381137531 1051235 /home/tester/tomcat_****_****_8089/logs/catalina.out (deleted)
java 11059 tester 2w REG 8,2 2381137531 1051235 /home/tester/tomcat_****_****_8089/logs/catalina.out (deleted)
java 18084 root 1w REG 8,2 2612191232 531376 /home/tester/tomcat_****_*****_8091/logs/catalina.out (deleted)
java 18084 root 2w REG 8,2 2612191232 531376 /home/tester/tomcat_****_*****_8091/logs/catalina.out (deleted)
java 18084 root 50w REG 8,2 15403225088 664984 /home/work/*****/log/***_****_****/CalendarPriceTask.log (deleted)
vim 20813 tester 0u CHR 136,8 0t0 11 /dev/pts/8 (deleted)
vim 20813 tester 1u CHR 136,8 0t0 11 /dev/pts/8 (deleted)
vim 20813 tester 2u CHR 136,8 0t0 11 /dev/pts/8 (deleted)
vim 20813 tester 4u REG 8,2 24576 1058929 /home/work/****/log/****/.tomcat_stdout.log.swp (deleted)
vim 31955 tester 0u CHR 136,4 0t0 7 /dev/pts/4 (deleted)
vim 31955 tester 1u CHR 136,4 0t0 7 /dev/pts/4 (deleted)
vim 31955 tester 2u CHR 136,4 0t0 7 /dev/pts/4 (deleted)
vim 31955 tester 4u REG 8,2 335872 1050381 /home/work/*****/log/****/.tomcat_stdout.log.swp (deleted)
重启服务或者重启机器后,空间释放
转载于:https://blog.51cto.com/qixiafeng/1730544