[lug] du vs df

Jose Castilleja tilleja at gmail.com
Mon Mar 11 13:49:52 MDT 2013


>From my own experiences, this was because a java process was not releasing
deleted file space right away.  I did an lsof to help identify this.

Jose
On Mar 11, 2013 1:47 PM, "Michael J. Hammel" <mjhammel at graphics-muse.org>
wrote:

> I ran into an interesting problem today.  We have hg configured on
> a /home partition and a user was reporting out of disk space when using
> it.  I checked with df -m and sure enough the partition was full.
>
> So I figured someone screwed up and filled up their home directory with
> junk.  I did a du -sm /home and found only about 40% of the partition
> size of data.  Du reported plenty of disk space.  df said the partition
> was full.  I don't expect them to be identical, just close.  du was 60%
> less than df (roughly) on a partition with about 220GB of total space.
>
> I'm assuming this was some kind of sparse file, though I'm not clear why
> it showed itself on /home.  /home is just for user data, including our
> mercurial and internal web repositories.
>
> While researching this a bit, I watched as df showed the partition being
> cleared of the extra usage.  Lots of space being freed up very fast.  du
> still showed the same thing.
>
> Any thoughts on what could make df think the partition was full but du
> not think that?  I'm trying to figure out what got us into that
> situation to begin with.  I suppose I could move the scm and web stuff
> to another partition but I'd like to know *how* this all came about.
>
> One possible event during this was a junior engineer was running a find
> on the entire filesystem looking for files with IP addresses in them
> (the boss asked if we logged web accesses, and that was his first idea
> to find out.  He has been properly flogged.).  I suppose if he was
> saving the output to a file, then deleted the file while the process
> ran, something bad might have happened.  Even that seems a bit of a
> stretch.
>
> Other than that, I'm not clear what might have been running to cause
> this.
>
> --
> Michael J. Hammel <mjhammel at graphics-muse.org>
>
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20130311/45cf5f03/attachment.html>


More information about the LUG mailing list