CentOS retrieves lost disk space on Linux

Source: Internet
Author: User

Today production environment of a server, Zabbix alarm space problem, using the DF command to view, disk space consumption of nearly 100%, the machine is not used on the data and logs out, but the space quickly reached 100%.

Using Du view, want to find out where the disk space is spent, the results found that his output and DF command output difference is very large, away from the 100% space occupied is still far away.

Where's The lost space, is the disk damaged?

Finally, Baidu for a long time, found two possible reasons:

1. After the disk file is deleted, but the original corresponding to the process of writing the file is still, grasping the file, in the inside to write the data, the space continues to be consumed by him, while the deleted space is not released, du command can not see the space occupied by the file.

2. Use the mount command to mount to a directory that has data, and the files in the previous directory are not visible and are not counted by DU.

I have not done any mount on this server, the problem is definitely on 1.

Young I always more impulsive, directly restart the server, the space restored to normal.

Production environment or should honestly follow the following steps to solve

Using Lsof | grep deleted to find deleted files

Kill the process of writing this log file outside, observe the disk space

Re-run the process


This article is from the Linux OPS blog, so be sure to keep this source http://leihuajun.blog.51cto.com/12248802/1960938

CentOS retrieves lost disk space on Linux

Related Article

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.