Solved

Huge difference between output of "du" and "df"

Posted on 2010-09-09
3
686 Views
Last Modified: 2013-12-15

How full is this filesystem?
Can someone explain the discrepancy:
[root@vrc45sd ~]# mount
/dev/sda3 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
[root@vrc45sd ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              80G   51G   25G  68% /
/dev/sda1              99M   26M   69M  28% /boot
tmpfs                 754M     0  754M   0% /dev/shm
[root@vrc45sd ~]# du -scm /
22466   /
22466   total

Open in new window


Thanks!

0
Comment
Question by:alpha-lemming
3 Comments
 
LVL 6

Accepted Solution

by:
jghelfman40 earned 250 total points
ID: 33640458
I was going to give a straight answer, until I saw this thread:
http://lists.centos.org/pipermail/centos/2009-September/082986.html

You may wish to look at it and do some investigation.

du and df report differently, and there are ways to figure out what is the right amount.

There is no clear answer, as there can be different reasons for the numbers you are seeing.
0
 
LVL 4

Expert Comment

by:ericnils
ID: 33640827
I'm not sure why, but I am getting odd measurements using the -scm options as well.

Try this instead:
du -h --max-depth=0 /
0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 250 total points
ID: 33641745
have you deleted huge files recently which could be still in use (open) by some processes? Try to reboot and see if there still big difference
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now