Solution for full Centos disk space: centos disk space
Disk usage before resolving:
The usage of the second disk reaches 97%.
[root@feng020 ~]# df -lFilesystem 1K-blocks Used Available Use% Mounted on/dev/xvda1 20641404 10565932 9026948 54% /tmpfs 4029028 0 4029028 0% /dev/shm/dev/xvdb1 103210940 67011820 30956312 97% /hotdata[root@feng020 ~]# df -l
Now that you have determined which disk occupies a high usage, switch to this disk to check which folder occupies a high usage, and then find the folder layer by layer.
du -h --max-depth=1
It can be seen that the folder kehu occupies 72 GB. This folder needs to be optimized now.
[root@feng020 ~]# cd /hotdata[root@feng020 hotdata]# du -h --max-depth=1140K ./temp12M ./memcached16K ./run72G ./kehu415M ./soft87M ./systemlog20K ./lost+found11G ./database163M ./interface91G .
Find the file usage in the kehu folder.
From the following results, we can see which folders are relatively large. After analysis, the log files run by the program are not processed for a long time, resulting in full disk space. Find the log directories in these folders and delete them.
[root@fengniu020 hotdata]# cd kehu/[root@fengniu020 kehu]# du -h --max-depth=1272M ./fx_niufeecms301M ./otocms_one84M ./dakehu84M ./flow580M ./tuan123111M ./zan-661M ./weipin36M ./htdocs96M ./huayuan3.4G ./mongo66M ./ecar97M ./u220204M ./u22394M ./pin-10580M ./jiayouka_niufeecms.bak20160606102M ./bai0033M ./139keji88M ./u20670M ./test_niufee94M ./u22493M ./jiangzhong_new283M ./otocms_new196M ./weikesoft_oto2.3G ./paopao..................