参考链接:
http://blog.csdn.net/ts1211/article/details/7385896
https://segmentfault.com/a/1190000000461077
http://www.jobui.com/mianshiti/it/linux/4830/
空间被占用,空间未释放
[root@abc ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/xvda1 ext4 20G 19G 252M 99% / #显示可用只有252M
tmpfs tmpfs 3.9G 0 3.9G 0% /dev/shm
/dev/xvdb5 ext4 493G 120G 348G 26% /mnt/disk-b
[root@abc /]# du -sh *
7.6M bin
24M boot
96M data
168K dev
4.0K dump.rdb
43M etc
141M home
149M lib
22M lib64
16K lost+found
4.0K media
120G mnt
133M opt
du: cannot access `proc/521/task/521/fd/4‘: No such file or directory
du: cannot access `proc/521/task/521/fdinfo/4‘: No such file or directory
du: cannot access `proc/521/fd/4‘: No such file or directory
du: cannot access `proc/521/fdinfo/4‘: No such file or directory
0 proc
604K root
15M sbin
4.0K selinux
4.0K srv
0 sys
4.0M tmp
1.4G usr
229M var
并没有发现是那个目录占用了空间,那这个怎么解决呢?
重启NGINX , 释放了一些空间
[root@abc local]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/xvda1 ext4 20G 16G 3.0G 85% / #显示可用空间变成了3G
tmpfs tmpfs 3.9G 0 3.9G 0% /dev/shm
/dev/xvdb5 ext4 493G 120G 348G 26% /mnt/disk-b
[root@abc local]# lsof |grep deleted
exim 1147 exim 8w REG 202,1 233881 788138 /var/log/exim/main.log-20160327 (deleted)
AliYunDun 7746 root 13uW REG 202,1 0 396344 /tmp/qtsingleapp-aegiss-a5d2-lockfile (deleted)
php-fpm 14270 root cwd DIR 202,1 0 788271 /data/htdocs/bakCRM/2016-04-06_15:48_dev/src/application/controller/admin/login/check (deleted)
AliHids 25867 root 25uW REG 202,1 0 393620 /tmp/qtsingleapp-aegisG-46d2-lockfile (deleted)
mysqld 27658 mysql 4u REG 202,1 0 393694 /tmp/ibtHXW4Y (deleted)
mysqld 27658 mysql 5u REG 202,1 0 393695 /tmp/ibhJeEPx (deleted)
mysqld 27658 mysql 6u REG 202,1 0 393696 /tmp/ib7tZlA6 (deleted)
mysqld 27658 mysql 7u REG 202,1 0 393697 /tmp/ib12DQ7d (deleted)
mysqld 27658 mysql 10w REG 202,1 14394220412 788182 /var/log/mysql/mysql.log (deleted)
mysqld 27658 mysql 11u REG 202,1 0 393698 /tmp/ibzmytZM (deleted)
重启mysql后,释放了较大的空间
[root@abc local]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/xvda1 ext4 20G 2.4G 17G 13% / #显示可用空间变成了17G
tmpfs tmpfs 3.9G 0 3.9G 0% /dev/shm
/dev/xvdb5 ext4 493G 120G 348G 26% /mnt/disk-b
[root@abc local]# lsof |grep deleted
exim 1147 exim 8w REG 202,1 233881 788138 /var/log/exim/main.log-20160327 (deleted)
mysqld 3962 mysql 4u REG 202,1 0 393694 /tmp/ibZc2eXM (deleted)
mysqld 3962 mysql 5u REG 202,1 0 393695 /tmp/ibZG2FAY (deleted)
mysqld 3962 mysql 6u REG 202,1 0 393696 /tmp/ibbjg7da (deleted)
mysqld 3962 mysql 7u REG 202,1 0 393697 /tmp/ibn9R5wx (deleted)
mysqld 3962 mysql 11u REG 202,1 0 393698 /tmp/ibzj0LgJ (deleted)
AliYunDun 7746 root 13uW REG 202,1 0 396344 /tmp/qtsingleapp-aegiss-a5d2-lockfile (deleted)
php-fpm 14270 root cwd DIR 202,1 0 788271 /data/htdocs/bakCRM/2016-04-06_15:48_dev/src/application/controller/admin/login/check (deleted)
AliHids 25867 root 25uW REG 202,1 0 393620 /tmp/qtsingleapp-aegisG-46d2-lockfile (deleted)
其实这些进程都应该删掉的,暂时先不管了。让服务先跑会儿吧…………
本文出自 “青春邓勇” 博客,请务必保留此出处http://dengyong.blog.51cto.com/8409869/1783778
原文地址:http://dengyong.blog.51cto.com/8409869/1783778