[Tfug] disk usage mystery..

John Gruenenfelder jetpackjohn at gmail.com
Mon Mar 5 20:36:57 MST 2012


On Mon, Mar 5, 2012 at 20:07, JD Rogers <rogersjd at gmail.com> wrote:
> Hi All,
>
> I've got a weird disk usage situation. I have about 1GB free on my
> laptop at boot according to "df -h". After running for a day or so, I
> get a friendly ubuntu warning that I have only 20MB free and "df -h"
> reports 100% used (I have ext4 tuned to keep only 2GB for root, but
> user space is filled). The tricky bit is that I can't see where this
> disk space is going.
>
> Since I noticed a reboot will reset back to about 1GB free, I
> suspected something in /var like logs or maybe tmp or cache files in
> the user home dir. However, "du -h --max-depth=1" in any of these
> suspect places turned up no more than a few MG difference from at boot
> time. In fact, I even did "du -h --max-depth=1 > duatboot" and waited
> a until my disk was full, did it again and diffed the outputs. To my
> surprised, the entire disk is essentially the same. So where is the
> disk usage going!?
>
> Now granted, 1GB free is not ideal these days, but I go through a lot
> of data and only move it off to my workstation when I need to free up
> space or move to another project. Running around 1GB free has worked
> fine for the past year or so, and this behavior has only showed up in
> the past few weeks.
>
> Anyone have any insights or suggestions?
>
> ubuntu 11.10 updated
> ext4, encrypted home with ecryptfs
> swap is on a separate partition

JD,

This is just a shot in the dark, but perhaps you have some broken
process (either a bug or something more malicious) that is filling up
the space with temp files.  It is not uncommon for a process to create
a random temp file, open it, then unlink it.  At this point, the
process can still use the file for storage but nobody else should be
able to open the file because it will not be listed on the file
system.  As soon as the process closes the file, the final link is
released and the data is finally deleted.

This would explain why you can't find the files and why it gets better
after a reboot.  However, I do not know how du treats these sorts of
files when printing directory space usage.  If this is indeed the
case, I'm not sure how easy it will be to track down the culprit.
Normally, temp files, and especially those created in this manner,
hold very little data.


-- 
--John Gruenenfelder    Systems Manager, MKS Imaging Technology, LLC.
Try Weasel Reader for Palm OS  --  http://weaselreader.org
"This is the most fun I've had without being drenched in the blood
of my enemies!"
        --Sam of Sam & Max




More information about the tfug mailing list