FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 02-01-2010, 03:00 PM
Todd Denniston
 
Default very large difference between df and du (10 GB, hard to believe)

Robert Grasso wrote, On 02/01/2010 10:29 AM:
> Hello,
<SNIP>
> CentOS 4.8. I noticed a difference between df and du which is hard to believe :
>
> according to df, I am using 29 GB
> [root@cedrat-rt ~]$ df -h
> Filesystem Size Used Avail Use% Mounted on
> /dev/sda1 33G 29G 2.8G 92% /
> none 506M 0 506M 0% /dev/shm
>
> (there are no other partitions - ok, I could have partitioned it a bit more)
> but according to
>
> du -kshxc /*
> my largest directory is /var (because of mysql) and the grand total is
> 19 GB
>
> I have a 10 GB difference between both outputs.
<SNIP>
> e2fsck reports a clean filesystem
<SNIP>
> Does anybody have a suggestion ?

<commentary on options>
-k is 1k block size
-h is print human readable (with appropriate extensions)
which ever of them is last wins for display... I suggest only using one though, to reduce possible
confusion.
for large measurements I usually use -m,
of course it could be fun to use --block-size=1024M instead, i.e., 1G.
</commentary on options>

I too would expect them to come close to matching, unless you have a lot of 3.5k (or less) files in
a 4k inode file system.

du -shxc --count-links /*
du -shxc --apparent-size /*
du -shxc --count-links --apparent-size /*

--
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-01-2010, 03:44 PM
Ryan Pugatch
 
Default very large difference between df and du (10 GB, hard to believe)

Robert Grasso wrote:
> Hello,
>
> I have a small server running a tool (RT : perl + mysql + apache) for our support team. I stripped down everything else. The OS is
> CentOS 4.8. I noticed a difference between df and du which is hard to believe :
>


Did you mount something such as an NFS share over a directory that has
stuff in it?

Ryan
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 12:56 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org