LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-12-2011, 09:01 AM   #1
sh4ka
LQ Newbie
 
Registered: Apr 2011
Posts: 13

Rep: Reputation: 0
Wrong disk usage


Hi everybody,

I have a strange problem regarding disk usage on a CentOS plain box.

df command shows 75GBs used..

Code:
[root@server.com:~]df -ah
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda4             121G   75G   40G  66% /
proc                     0     0     0   -  /proc
sysfs                    0     0     0   -  /sys
devpts                   0     0     0   -  /dev/pts
/dev/sda2             9,7G  154M  9,1G   2% /tmp
/dev/sda1              99M   24M   71M  25% /boot
tmpfs                 2,0G     0  2,0G   0% /dev/shm
none                     0     0     0   -  /proc/sys/fs/binfmt_misc
But du command shows only 23 GBs:

Code:
[root@server.com:~]du -shc /
23G	/
23G	total


[root@server.com:~]du -shc /*
8,0M	/bin
18M	/boot
136K	/dev
65M	/etc
624M	/home
328M	/lib
18M	/lib64
16K	/lost+found
8,0K	/media
8,0K	/misc
954M	/mnt
8,0K	/opt
242M	/php-cache
0	/proc
888K	/root
33M	/sbin
8,0K	/selinux
4,0K	/service
8,0K	/srv
0	/sys
3,3M	/tmp
1,5G	/usr
20G	/var
23G	total
Other disk info that may help:

Code:
[root@server.com:~]fdisk -l

Disk /dev/sda: 146.1 GB, 146163105792 bytes
255 heads, 63 sectors/track, 17769 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        1318    10482412+  83  Linux
/dev/sda3            1319        1579     2096482+  82  Linux swap / Solaris
/dev/sda4            1580       17769   130046175   83  Linux

[root@server.com:~]cat /etc/fstab
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/tmp              /tmp                    ext3    defaults        1 2
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda3         swap                    swap    defaults        0 0
What is wrong here? Am I missing something?
What's the real usage for / ? 23 or 75 gb?

Thanks!
 
Old 05-12-2011, 10:12 AM   #2
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 116Reputation: 116
23.

du looks at the files and sums them up. df is a filesystem overview.

The report from df doesn't take account of certain things such as deleted files still being held open by running processes.

Lots of info around for googling.
 
Old 05-12-2011, 08:53 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
There are 4 things to read up on in detail if you really want the gory truth

http://linux.die.net/man/1/df
http://linux.die.net/man/1/du
http://linux.die.net/man/8/mkfs.ext3 - see -m flag
https://secure.wikimedia.org/wikiped.../Binary_prefix - powers of 10 (manufacturers claims) vs powers of 2 (real computers)

It's one of those 'simple' qns with a complex answer.
See also load avgs, RAM usage for similar issues.
 
Old 05-13-2011, 05:35 AM   #4
sh4ka
LQ Newbie
 
Registered: Apr 2011
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks! After rebooting up the server, the disk usage went normal and shows the same as du -sh

Thanks a lot for all the suggestions!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Wrong space usage! badihi Linux - General 5 03-24-2011 11:19 AM
Disk Usage Analyzer reports too much disk space? ler0nldb2 Linux - Newbie 1 09-12-2009 10:27 AM
Wrong disk free space (VERY wrong) macrojd Linux - Server 12 05-17-2009 02:14 AM
df reports wrong disk usage Mathieu_G Linux - General 4 04-13-2005 02:44 PM
101% disk usage on an empty disk tsiuser Linux - Software 3 01-28-2004 06:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration