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