Solution for full Centos disk space: centos disk space

Source: Internet
Author: User

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..................

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.