The size of the hard drive to delete files in linux remains unchanged.

Source: Internet
Author: User

The size of the file hard disk deleted in linux remains unchanged. Recently, the game server's hard disk is full. The strange thing is that du/opt/is only 25 GB, but df is always case. The system capacity has been used. % available nodes/dev/sda5 195g 23G 163G 13%/ /dev/sda2 68G 65G 0 100%/opt/dev/sda1 99 M 12 M 82 M 13%/boottmpfs 16G 0 16G 0%/dev/shm do not understand why run du -- max-depth = 1-h in the/opt/directory for 65 GB, which is more than 20 GB. Later, we accidentally found that the lsof | grep delete command can be used to view the deleted data, but the system still the files in use do not release disk space, so we can see that there are a lot of such resources that cause the hard disk to be full. mysqld 1859 mysql 4u REG 8, 5 0 45645829/tmp/ibWdlI73 (deleted) mysqld 1859 mysql 5u REG 8, 5 0 4564 5830/tmp/ib7hOICX (deleted) mysqld 1859 mysql 6u REG 8, 5 0 45645831/tmp/ib2DrJ7Q (deleted) mysqld 1859 mysql 7u REG 8, 5 0 45645832/tmp/ibP15b4K (deleted) mysqld 1859 mysql 34u REG 45645833 5135/tmp/ibGnNBCG (deleted) nginx 8201036 root 2 w REG 16564486/opt/nginx/logs/error. log (deleted) nginx 5135 root 4 w REG 40241299485 16564444/opt/nginx/logs/access. log (deleted) nginx 5135 root 5 w REG 8201036 16564486/opt/nginx/logs/error. log (deleted) nginx 5136 nobody 2 w REG 8201036 16564486/opt/nginx/logs/error. log (deleted) nginx 5136 nobody 4 w REG 40241299485 16564444/opt/nginx/logs/access. log (deleted) nginx 5136 nobody 5 w REG 8201036 16564486/opt/nginx/logs/error. log (deleted) nginx 5137 nobody 2 w REG 8201036 16564486/opt/nginx/logs/error. log (deleted) nginx 5137 Nobody 4 w REG 40241299485 16564444/opt/nginx/logs/access. log (deleted) nginx 5137 nobody 5 w REG 8201036 16564486/opt/nginx/logs/error. log (deleted) nginx 5138 nobody 2 w REG 8201036 16564486/opt/nginx/logs/error. log (deleted) nginx 5138 nobody 4 w REG 40241299485 16564444/opt/nginx/logs/access. log (deleted) nginx 5138 nobody 5 w REG 8201036 16564486/opt/nginx/logs/error. log (dele Ted) nginx 5139 nobody 2 w REG 8201036 16564486/opt/nginx/logs/error. log (deleted) nginx 5139 nobody 4 w REG 40241299485 16564444/opt/nginx/logs/access. log (deleted) nginx 5139 nobody 5 w REG 8201036 16564486/opt/nginx/logs/error. log (deleted) java 15027 root 11 w REG 3911 15518134/opt/tomcat. wgame/logs/logs.20130328/catalina.2013-03-28.log (deleted) java 15027 root 12 w REG 2058 155 18161/opt/tomcat. wgame/logs/logs.20130328/localhost.2013-03-28.log (deleted) java 15027 root 13 w REG 15518172/opt/tomcat. wgame/logs/logs.20130328/manager.2013-03-28.log (deleted) java 15027 root 14 w REG 8, 2 0 15518184/opt/tomcat. wgame/logs/logs.20130328/admin.2013-03-28.log (deleted) java 15027 root 15 w REG 8, 2 0 15518185/opt/tomcat. wgame/logs/logs.20130328/host-manager.2013-03-28.log (dele Ted) java 15027 root 63 w REG 165413 15518332/opt/tomcat. wgame/logs/wgame_s1_s2-deleteItemJob.logjava 15027 root 97 w REG 10436 15518319/opt/tomcat. wgame/logs/wgame_s3-deleteBattlefieldJob.logjava 15027 root 103 w REG 10437 15518322/opt/tomcat. wgame/logs/wgame_s1_s2-deleteBattlefieldJob.logjava 15027 root 104 w REG 9850 15518323/opt/tomcat. wgame/logs/wgame-deleteBattlefieldJob.logja Va 15027 root 111 w REG 272 15518331/opt/tomcat. wgame/logs/wgame-deleteItemJob.logjava 15027 root 113 w REG 172381 15518334/opt/tomcat. wgame/logs/wgame_s3-deleteItemJob.logmysqld_sa 23075 root 0u CHR 136, 1 3/dev/pts/1 (deleted) mysqld_sa 23075 root 1u CHR 136, 1 3/dev/pts/1 (deleted) mysqld_sa 23075 root 2u CHR 136,1 3/dev/pts/1 (deleted) after these services are completed, restart the service and use df to check whether the capacity of the active system has been used. % available nodes/dev/sda 5 195G 25G 160G 14% // dev/sda2 68G 24G 41G 37%/opt/dev/sda1 99 M 12 M 82 M 13%/boottmpfs 16G 0 16G 0%/dev/shm problem solved.

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.