What to do if the server Linux system is full

Source: Internet
Author: User
Tags disk usage

Warning: After SSH reported various errors, said the device is busy IO read and write errors are now want to quickly check the system disk.


first of all, it must be clear that:The system disk itself is not used for storing data, the system disk is used to store configuration files and temporary files used, Web site data and important logs are stored in the data disk, often clean the system disk is only to alleviate the current system disk pressure, the fundamental solution is to point the data or log storage path to the data disk.



       1. Perform df-h to view total disk usage
       650) this.width=650; "alt=" df-h.png "class=" Zoom "id=" aimg_2712 "src=" Http://shp.qpic.cn/txdiscuz_pic/0/_bbs_qcloud _com_forum_201410_24_120012ijnanggjxlndjnrc.png/0 "title=" Df-h.png "width=" "style=" padding:0px;margin:0px; Border:none; "/>
      2. Execute du-sh/* View disk footprint for all directories thus we can see that the main is/usr and/var 2 directories occupy a larger space
       650) this.width=650; "alt=" du-sh.png "class=" Zoom "id=" aimg_2713 "src=" Http://shp.qpic.cn/txdiscuz_pic/0/_bbs_ qcloud_com_forum_201410_24_120017f743344smw57x5vz.png/0 "title=" Du-sh.png "width=" "style=" Padding:0px;margin : 0px;border:none; "/>
       3, the execution du-sh/usr/* view the/USR directory sub-directory disk occupancy, so you can see is/usr/local this subdirectory consumes a lot of disk space   
       650) this.width=650; "alt=" du-sh2.png "class=" Zoom "id=" aimg_2714 "src=" Http://shp.qpic.cn/txdiscuz_pic/0/_bbs_ qcloud_com_forum_201410_24_120022yhfu77527ujb5okk.png/0 "title=" Du-sh2.png "width=" 547 "style=" Padding:0px;margin : 0px;border:none; "/>
       4, Executive du-sh/usr/local/* | sort-r | head-n View 10 files in the/usr/local directory that occupy a larger size and sort in descending order
       650) this.width=650; "alt=" du-sh3.png "class=" Zoom "id=" aimg_2715 "src=" Http://shp.qpic.cn/txdiscuz_pic/0/_bbs_ qcloud_com_forum_201410_24_120029w5rozg24rjgjle3g.png/0 "title=" Du-sh3.png "width=" "style=" Padding:0px;margin : 0px;border:none; "/>
       650) this.width=650; "alt=" du-sh4.png "class=" Zoom "id=" aimg_2716 "src=" Http://shp.qpic.cn/txdiscuz_pic/0/_bbs_ qcloud_com_forum_201410_24_120033moej9f0ct5jiefjf.png/0 "title=" Du-sh4.png "width=" "style=" Padding:0px;margin : 0px;border:none; "/>
5. At this point, the file that occupies the system disk is found. However, this is only a test, the real situation is to be detailed analysis, if you find a more strange directory file, you can search the Web to find out if the file is useful, whether it can be deleted. However, usually non-/boot/bin/etc/lib/lib64 files are non-system files, the deletion of the system should have little impact,but it's important to make sure before you delete it ..

This article is from the "lake and Laughter" blog, please make sure to keep this source http://hashlinux.blog.51cto.com/9647696/1759286

What to do if the server Linux system is full

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.