Re: du vs df size difference

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



At Wed, 30 Sep 2009 16:59:25 -0400 CentOS mailing list <centos@xxxxxxxxxx> wrote:

> 
> Hi all,
> 
> Curious issue.. looking in to how much disk space is being used on a 
> machine (CentOS 5.3).  When I compare the output of du vs df, I am 
> seeing a 12GB difference with du saying 8G used and df saying 20G used.
> 
> # du -hcx /
> 8.0G    total
> 
> # df -h /
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/xvda3             22G   20G  637M  97% /
> 
> I recognize that in most cases du and df are not going to report the 
> same but I am concerned about having a 12GB disparity.  Does anyone have 
> any thoughts about this or reason as to why there is a big difference? 
> I have read a few articles online about it and none have really shown 
> such a large difference.

Somewhere you have an open, but deleted file.  Maybe someone deleted a
log file and did NOT do a SIGHUP (or restart) of the corresponding
deamon? Or some similar weirdness.  Some running process is hanging onto
a an open file descriptor of a file that has been deleted.  Note that
some program create 'unnamed' temp files -- opened, then deleted -- as
soon as the program exits, the temp file space gets recycled, without
the program 'remembering' to delete it, since it is already deleted.
This saves having to deal with an exit handler in case the program crashes.

> 
> Thanks
> 
> 
> 
> Ryan Pugatch
> Systems Administrator, TripAdvisor
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
> 
>                                                                                    

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller@xxxxxxxxxxxx       -- http://www.deepsoft.com/ModelRailroadSystem/
                  
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux