Different results are reported for df and du in linux.

Source: Internet
Author: User
In linux, the results of df and du reports are different-Linux general technology-Linux technology and application information. The following is a detailed description. There is a script at work
Regularly log on to the server. df: Check partition usage.
If the usage rate exceeds 80%
Alert (email & sms)
I recently found a machine reported
Wait for a while and process it (directly rm file)
Report again after a short period of time
Let's look at it again. When du is used to find out which directory occupies a large space
We found that the reported partition actually had a low usage.
However, df is a warning line (80%)
I know it must be

Some processes have not released some deleted files.

This kind of thing has happened before
Generally, restarting the machine will definitely release the space occupied by these processes.
But do I have to restart the machine to solve the problem?
Of course not.
Just stop the processes that open the deleted files.
Therefore
Lsof | grep deleted
I found it all at once.
Then kill it
Df again
It's normal.
Lessons learned:

Do not delete files that are being opened.
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.