Linux root directory full but du look at the directory is not always a lot of problems

Source: Internet
Author: User
Tags chr zookeeper

DF View root directory full disk space


[[email protected] logs]# DF
File System               1k-block       used       available% mount point
/dev/sda2             41284928  0   Span style= "FONT-SIZE:14PX;" > 41284928
  100%/
tmpfs                   1962324         0   1962324   0%/DEV/SHM
/dev/sda1                516040     59236    430592  13%/boot
/dev/sda5               1542096     35072    1428688   3%/data


View space consumption in the root directory, accounting for only 10G

Conjecture should not free up space after deleting files

Use lsof|grep deleted

You can see the files with a bunch of deleted states

[Email protected]/]# Lsof|grep deleted
VMTOOLSD 1110 root 5u REG 8,2 9341 1703941/tmp/vmware-root/apploader-1110.log (DE leted)
Java 3873 root 1w REG 8,2 8283185468 661954/HOME/TESTER/ZOOKEEPER/LOGS/ZOOKEEPER.O UT (deleted)
Java 3873 root 2w REG 8,2 8283185468 661954/home/tester/zookeeper/logs/zookeeper.o UT (deleted)
Java 11059 Tester 1w REG 8,2 2381137531 1051235/home/tester/tomcat_****_****_8089/logs /catalina.out (Deleted)
Java 11059 tester 2w REG 8,2 2381137531 1051235/home/tester/tomcat_****_****_8089/logs /catalina.out (Deleted)
Java 18084 root 1w REG 8,2 2612191232 531376/home/tester/tomcat_****_*****_8091/log S/catalina.out (Deleted)
Java 18084 root 2w REG 8,2 2612191232 531376/home/tester/tomcat_****_*****_8091/log S/catalina.out (Deleted)
Java 18084 root 50w REG 8,2 15403225088 664984/home/work/*****/log/***_****_****/cale NdarPriceTask.log (Deleted)
Vim 20813 tester 0u CHR 136,8 0t0 11/dev/pts/8 (Deleted)
Vim 20813 tester 1u CHR 136,8 0t0 11/dev/pts/8 (Deleted)
Vim 20813 Tester 2u CHR 136,8 0t0 11/dev/pts/8 (Deleted)
VIM 20813 Tester 4u REG 8,2 24576 1058929/home/work/****/log/****/.tomcat_stdout . LOG.SWP (Deleted)
Vim 31955 tester 0u CHR 136,4 0t0 7/DEV/PTS/4 (Deleted)
Vim 31955 tester 1u CHR 136,4 0t0 7/DEV/PTS/4 (Deleted)
Vim 31955 Tester 2u CHR 136,4 0t0 7/DEV/PTS/4 (Deleted)
VIM 31955 Tester 4u REG 8,2 335872 1050381/home/work/*****/log/****/.tomcat_stdou T.LOG.SWP (Deleted)


After restarting the service or restarting the machine , the space is released

Linux root directory full but du look at the directory is not always a lot of problems

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.