Linux disk cannot free space after deleting files

Source: Internet
Author: User

Pre-launch environment testers found that the disk space is covered, so use df-h and Du-sh * found large files, and delete.

But did not free up space, df-h or display occupancy rate is 100%, at this time du-sh * Display occupies only 7G, and Df-h looked at the content does not match.


In Linux or Unix systems, deleting files via RM or the File Manager removes the link from the file system's directory structure. However, if the file is consumed by the program, it cannot really clean up the disk space and the file is physically present.

Use lsof at this time | grep deleted view

[Email protected]/]# Lsof | grep deleted

Mingetty 921 root txt REG 202,1 15256 138316/sbin/mingetty (Deleted)

Mingetty 923 root txt REG 202,1 15256 138316/sbin/mingetty (Deleted)

Mingetty 925 root txt REG 202,1 15256 138316/sbin/mingetty (Deleted)

Mingetty 927 root txt REG 202,1 15256 138316/sbin/mingetty (Deleted)

Mingetty 929 Root txt REG 202,1 15256 138316/sbin/mingetty (Deleted)

Mingetty 931 root txt REG 202,1 15256 138316/sbin/mingetty (Deleted)

Aliyundun 4170 Root 6w REG 202,1 1544 3595/usr/local/aegis/aegis_update/data/da Ta.1 (Deleted)

Aliyundun 4170 Root 12w REG 202,1 614 3571/usr/local/aegis/aegis_update/data/da Ta.1 (Deleted)

Alihids 12357 root 6w REG 202,1 1544 3595/usr/local/aegis/aegis_update/data/da Ta.1 (Deleted)

Alihids 12357 root 12w REG 202,1 614 3571/usr/local/aegis/aegis_update/data/da Ta.1 (Deleted)

Aliyundun 25564 root 6w REG 202,1 1544 3595/usr/local/aegis/aegis_update/data/da Ta.1 (Deleted)

Aliyundun 25564 Root 12w REG 202,1 614 3571/usr/local/aegis/aegis_update/data/da Ta.1 (Deleted)

Java 29907 Application 1w REG 202,1 12423852032 141055/opt/huoqiu/logs/minority_subject_tas K/minority_subject_task_buyqueuehandletask-20160914.log (Deleted)

Java 29907 application 2w REG 202,1 12423852032 141055/opt/huoqiu/logs/minority_subject_tas K/minority_subject_task_buyqueuehandletask-20160914.log (Deleted)


The program is opening the deleted file, after restarting the program found that the space has been cleaned, df-h and du-sh to see the content matches.

Linux disk cannot free space after deleting files

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.