[Tfug] disk usage mystery..

JD Rogers rogersjd at gmail.com
Mon Mar 5 22:31:57 MST 2012


Ian: I can confirm that du and df report different usages. "du -x"
prevents double counting the remounted home, and I'm seeing a few
hundred MB difference between df nd du on usage which is about how
much disk space I'm down since boot.

> Yes, when a process exits, in any manner, the OS will take care to
> close any files it may have had open.  If these files have no further
> links on the file system, they are deleted.

Hrmm.. that's bad news, because I logged out, switched to a virt term,
and stopped lightdm... still full disk and what I thought were all the
likely culprits (firefox, plugin-container, etc) were dead. Not a good
sign.

>>> Presumably 'lsof | grep "(deleted)"' when disk usage is high will show
>>> such files (and, conveniently, the processes with the open links). I had
>>> a similar disk-usage problem situation recently (fixed by changing a
>>> script's configurable tmpdir), but didn't make the connection.
>>
>> I'll try that as soon as I see my free space plummet. At ten minutes
>> after reboot, I have 19 of  of these deleted files, mostly gvfs
>> related. Not sure that isn't normal.
>>
>>>
>>> On my system I get a number of false positives here that actually exist
>>> (e.g. /usr/bin/xinit, which clearly still exists on my system!).
>>> However, it's pretty easy to check if you can see a given file.
>
> Oh yes, I forgot all about lsof.  My system has been on for 1h30m and
> I have 20 deleted opened files listed.  Three are related to X
> processes, like Xorg, but lsof says that the "file" refers to the
> executable's "text" data segment.  Perhaps this has something to do
> with reading symbols for module loading, or some such.  Most of the
> rest are actual (tiny) temp files and a couple of log files.  There
> are also a handful of Apache SSL mutex files listed, but they don't
> contain any data.

Well, lsof alo reports size.. I'm currently down about 300MB since
boot, and lsof reportsa few dozen deleted files all less than 300k. So
I must still be missing something.




More information about the tfug mailing list