1

I have a Debian Wheezy install that is currently showing 100% disk usage, yet the files in / do not seem to add up to the sum of the disk as reported in a df -h output (as tested with a du -sh /). I have since rebooted, so this would have cleared out any open files that could have been deleted but still remained open.

Output of mount:

/dev/disk/by-uuid/blahblah-3431-43i9-ac71-blahlah on / type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered)

Output of df -h:

rootfs                                                   36G   33G  810M  98% /
/dev/disk/by-uuid/blahblah-3431-43i9-ac71-blahlah   36G   33G  825M  98% /

Output of du -sh of / (excluding media, as that dir has directories mounted from other drives):

# du -sh --exclude=media *
7.4M    bin
18M     boot
0       dev
11M     etc
13G     home
0       initrd.img
116M    lib
4.0K    lib64
16K     lost+found
4.0K    mnt
341M    opt
du: cannot access `proc/5744/task/5744/fd/4': No such file or directory
du: cannot access `proc/5744/task/5744/fdinfo/4': No such file or directory
du: cannot access `proc/5744/fd/4': No such file or directory
du: cannot access `proc/5744/fdinfo/4': No such file or directory
0   proc
134M    root
1.1M    run
7.6M    sbin
4.0K    selinux
4.0K    srv
0       sys
56K     tmp
6.4G    usr
2.4G    var
0       vmlinuz
4
  • 1
    When you run du add an x parameter to it and it will run on a single filesystem. That way you won't need to exclude anything and output will be clearer. Did you try to run fsck on that filesystem?
    – grekasius
    Jun 29, 2014 at 9:07
  • 1
    Also, don't forget the dotfiles at the root level; including .[A-z]* as an additional argument to du can often shed light on directories like .hugecache (example invented for illustration).
    – MadHatter
    Jun 29, 2014 at 9:09
  • Possible duplicate of serverfault.com/questions/57098/du-vs-df-difference
    – HBruijn
    Jun 29, 2014 at 9:35
  • I tried passing -x to du and it provided the same result. Also tried looking for [A-z]* as well as "du -sh .*" to no avail. Even when I am in / and attempt to tab complete from ".", it only presents 2 files of which are only a few kilobytes.
    – Peter
    Jun 29, 2014 at 9:39

1 Answer 1

2

It's possible that even with a restart that something is creating and holding the files. Do a lsof | grep deleted or something to that effect to view the (deleted) files.

Also, a great program to track disk usage is ncdu. With ncdu -x . you won't miss any files and it won't traverse the partitions.

1
  • Thank you! The lsof didn't return much but I had some luck with ncdu. It shows that my media directory actually contains 10.5G of data! It would seem I accidentally copied some data to the root filesystem rather than mounting, like I do with my other dirs in /media . Good thinking, Vladimir, and thanks all. :)
    – Peter
    Jun 29, 2014 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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