Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2006
    Posts
    520

    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!

  2. #2
    Join Date
    Feb 2003
    Location
    Panorama City, CA
    Posts
    2,581
    I think they are calculating different numbers
    Server I use for a poor mans VPN shows a diff of 2gb between your commands.

    I run df -h for mounting points and to show usage and du -sh * to track down folders or files that are big.
    Remote Hands and Your Local Tech for the Los Angeles area.

    (310) 573-8050 - LinkedIn

  3. #3
    Now and again you can get inconsistencies in disk usage reporting which can be solved by doing an fsck on the drive.
    Accelerated Hosting - From Constant Internet
    Automatically serving your website from the nearest server
    Get hosted on our global network! America / Europe / Asia

  4. #4
    Join Date
    May 2011
    Location
    N/A
    Posts
    118
    You must run FSCK on the node.

    Then,

    root@server [/]#touch /home/quota.user
    root@server [/]#touch /home/quota.group
    root@server [/]#chmod 600 /home/quota.user
    root@server [/]#chmod 600 /home/quota.group
    Run Following command now

    root@server [/]#quotacheck -acugv
    Now run

    root@server [/]#/scripts/fixquotas –force

  5. #5
    Join Date
    Apr 2006
    Posts
    520
    After rebooting the server, the disk usage went normal and shows the same as du -sh

    Thanks a lot for all the suggestions!

Similar Threads

  1. cPanel is showing wrong disk space usage
    By crazyaboutlinux in forum Hosting Security and Technology
    Replies: 9
    Last Post: 07-30-2010, 03:47 AM
  2. Something wrong - A LOT of memory usage.
    By jthornton in forum VPS Hosting
    Replies: 6
    Last Post: 08-01-2009, 01:44 PM
  3. Wrong disk usage in WHM
    By beautiful mind in forum Hosting Security and Technology
    Replies: 18
    Last Post: 07-12-2009, 08:42 AM
  4. bandwidth usage being wrong
    By ihostdev in forum Hosting Security and Technology
    Replies: 1
    Last Post: 02-08-2006, 04:18 AM
  5. Cpanel reporting wrong disk usage
    By e1ven in forum Hosting Software and Control Panels
    Replies: 7
    Last Post: 12-09-2003, 06:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •