A large Linux file has been deleted, using DF to see that the space used has not decreased

Source: Internet
Author: User
Tags disk usage

Today in a Linux system, using the DF command to view disk usage, the discovery/root partition uses 100%

Then delete a large file/var/lib/pgsql/9.1/pgstartup.log, and then use DF to view the usage, showing the content unchanged. As shown in the following:

In the online search, it seems that the reason for the inode, has not really deleted, nor how to say clearly, so I use the following command to view:

[Email protected]5201351 ~]# lsof | grep deleted      //lsof command to display system-open files

After the command we can see that although the/var/lib/pgsql/9.1/pgstartup.log file I have deleted, but the use of the file Postgres process is still in, note that the Postgres is the user name, not the process name.

Find the cause of the problem, the next is to solve this problem, to solve this actually only need to restart the PostgreSQL service. After restarting and then using the DF command to view, the display is normal.

A large Linux file has been deleted, using DF to see that the space used has not decreased

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.