某个数据库机器报/var分区使用率高
[root@hydb2 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 95G 64K 95G 1% /dev
tmpfs 95G 644M 94G 1% /dev/shm
tmpfs 95G 1.9G 93G 2% /run
tmpfs 95G 0 95G 0% /sys/fs/cgroup
/dev/mapper/ol-root 410G 5.7G 4.4G 57% /
/dev/sdg2 10G 247M 9.8G 3% /boot
/dev/sdg1 10G 8.6M 10G 1% /boot/efi
/dev/mapper/ol-var 5.0G 3.1G 2.0G 62% /var
tmpfs 19G 12K 19G 1% /run/user/42
tmpfs 19G 0 19G 0% /run/user/0
通过层层目录查找,发现
1、/var/spool/postfix/maildrop/目录下小文件特别的多,占用空间大,
处理办法:find /var/spool/postfix/maildrop/ -type f -mtime +1 |xargs rm -rf
2、/root/spool/abrt/目录下小文件多,占用空间大
处理办法:清理oops和ccpp文件后,关闭服务
查看自启动的服务
systemctl list-unit-files | grep enable|grep abrtd
systemctl stop abrtd.service;systemctl disable abrtd.service
systemctl stop abrt-oops.service;systemctl disable abrt-oops.service
systemctl stop abrt-ccpp.service;systemctl disable abrt-ccpp.service