1.查看磁盘具体占用情况
[root@localhost gsidc]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 xfs 92G 21G 72G 23% /
devtmpfs devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs tmpfs 7.8G 129M 7.7G 2% /run
tmpfs tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/sda1 xfs 197M 192M 5.0M 98% /boot
tmpfs tmpfs 1.6G 12K 1.6G 1% /run/user/42
tmpfs tmpfs 1.6G 0 1.6G 0% /run/user/1000
2.删除具体位置磁盘占用无用文件
3. 查看磁盘删除情况
[root@localhost gsidc]# lsof |grep delete
4. 彻底释放磁盘空间
mysqld_sa 11317 root cwd DIR 8,6 0 102107 /usr/local/mysql (deleted)
mysqld_sa 11317 root 255r REG 8,6 13620 102182 /usr/local/mysql/bin/mysqld_safe (deleted)
mysqld 11353 mysql txt REG 8,6 29382763 102138 /usr/local/mysql/bin/mysqld (deleted)
mysqld 11353 mysql 5u REG 8,9 0 58761 /tmp/ibpfbHsa (deleted)
mysqld 11353 mysql 6u REG 8,9 0 58771 /tmp/ibqoMnag (deleted)
mysqld 11353 mysql 7u REG 8,9 0 58772 /tmp/ibN4C4Rl (deleted)
mysqld 11353 mysql 8u REG 8,9 0 58781 /tmp/ibkWP8zr (deleted)
mysqld 11353 mysql 12u REG 8,9 0 58782 /tmp/ibnqrZsx (deleted)
java 16961 root 1w REG 8,3 5822263296 457562 /opt/tomcat/logs/catalina.out (deleted)
java 16961 root 2w REG 8,3 5822263296 457562 /opt/tomcat/logs/catalina.out (deleted)
java 16961 root 12w REG 8,3 5469261824 197191 /opt/tomcat/logs/catalina.2013-01-02.log (deleted)
java 16961 root 13w REG 8,3 2166784 197192 /opt/tomcat/logs/localhost.2013-01-02.log (deleted)
java 16961 root 14w REG 8,3 0 391681 /opt/tomcat/logs/manager.2013-01-02.log (deleted)
java 16961 root 15w REG 8,3 0 391682 /opt/tomcat/logs/host-manager.2013-01-02.log (deleted)
关闭删除文件进程
[root@localhost /]# kill -9 16961
磁盘容量恢复