Stephen Gran on 10 Aug 2006 10:18:21 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Debian df command reports wrong usage on root partition


On Wed, Aug 09, 2006 at 10:51:56PM -0400, Lee Marzke said:
> OK,   I didn't touch  /var/log, and the system has been rebooted a few times
> in the last month since I noticed the problem.
> 
> lsof | grep tmp shows a 20G file in /tmp
> python2.3 5056       zope    6u      REG        8,3  20971520     700398 
> /tmp/tmpeAnx7E (deleted)
> 
> This doesn't show up in a directory listing,  and only exists when Zope 
> is running.
> 
> So what is this, and why is df showing this ?   Running Zope on SuSE, 
> did not do this.

df is showing it because it occupies space.  du is not showing it
because the filesystem has marked it as deleted.  I don't particularly
know zope, so I can't really guess why Suse would have behaved
differently - I can only guess that it had a different TMP directory
than this machine does for www-data or zope, or that it used a zope
session file that was smaller or something else entirely.

This is actually how upgrades in place work, and why you can overwrite
files in use on Linux (unlike for instance, Windows, where you get a
"can't delete that file" message).  You mark the file as deleted, but
the running programs that are using it have a file handle open to it,
so it doesn't actually go away - it's just inaccessable to anyone else
who comes along later.
-- 
 --------------------------------------------------------------------------
|  Stephen Gran                  | Why be a man when you can be a success? |
|  steve@lobefin.net             | -- Bertolt Brecht                       |
|  http://www.lobefin.net/~steve |                                         |
 --------------------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug