Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Today my disk got full. It was surprising, because I've been running the same automated script for a few months, with plenty of space, and no issues.

I don't understand where it's gone. du reports only 26 GiB used, which is what I expect.

root@data3:/home/upload# du -hs /
26G /

But df reports me that I'm using 46 GiB:

root@data3:/home/upload# df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs           52G   46G  4.0G  92% /
/dev/root        52G   46G  4.0G  92% /
devtmpfs        2.0G  4.0K  2.0G   1% /dev
none            395M  224K  394M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            2.0G     0  2.0G   0% /run/shm

I looked everywhere for big files, and didn't find any other than expected.

Here's is fsck results

root@debian:~# fsck -fv /dev/sda1
fsck from util-linux 2.20.1
e2fsck 1.42.2 (9-Apr-2012)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

   46418 inodes used (1.36%)
     188 non-contiguous files (0.4%)
      77 non-contiguous directories (0.2%)
         # of inodes with ind/dind/tind blocks: 0/0/0
         Extent depth histogram: 40238/63
 5782304 blocks used (42.45%)
       0 bad blocks
       1 large file

   33182 regular files
    6372 directories
       0 character device files
       0 block device files
       1 fifo
      22 links
    6853 symbolic links (6107 fast symbolic links)
       1 socket
--------
   46431 files

This is a SSD drive. I've been writing/erasing about 15 GiB a day since July.

Where did my 20 GiB go? What should I check?

share|improve this question
    
looks like a reboot solved the issue. But anyway, why did it happen ? –  user1219721 Jan 1 '13 at 22:41
2  
If you have an open file (e.g. a log file) and you remove that file without restarting or signaling the program which has an open handle to that file then free space will not be reclaimed until you do so. (and said program can continue to write to the file, even if it no longer shows up with ls). –  Hennes Jan 1 '13 at 23:55
    
how could I signal the program ? –  user1219721 Jan 2 '13 at 11:44
    
You use kill to send it a signal. The default signal is TERMinate, but in this you probably want HUP. (Originally it meant: the modem has hung up. Clean up files (e.g. save things) and terminate. These days is is often used to signal a program to reread it configuration files and restart (including with new log files). –  Hennes Jan 2 '13 at 14:49
    
I tried restarting tomcat and lighttpd. It doesn't free space. Only reboot do. –  user1219721 Jan 2 '13 at 23:21

1 Answer 1

In my case it was that I had still running wine process in the background, which still had access to the big World of Warcraft files.

You can look at the open file handles with the command lsof <optional process id>

As usual you can pipe it for easier reading lsof |less

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.