Disk Usage and Disk View are different

adapter

Well-Known Member
PartnerNOC
Sep 17, 2003
391
0
166
Hi all,

i have a quota problem with the domains on my servers, the bloack size of my hd is 4kb but apps with small files like Joomla take more of the normal space and the Cpanel Disk usage report a different value from Cpanel Disk Viewer i have try to check it also from ssh and this is what i get

[email protected] [/home/user/www/images/stories/food]# du -h

52K .


[email protected] [/home/user/www/images/stories/food]# du -bh
21K .


[email protected] [/home/user/www/images/stories/food]# ls -la
total 60
drwxr-xr-x 2 user 4096 Nov 24 18:58 ./
drwxr-xr-x 4 user 4096 Nov 24 18:59 ../
-rw-r--r-- 1 user 7216 Nov 24 18:58 bread.jpg
-rw-r--r-- 1 user3581 Nov 24 18:58 bun.jpg
-rw-r--r-- 1 user 2641 Nov 24 18:58 coffee.jpg
-rw-r--r-- 1 user 47 Nov 24 18:58 index.html
-rw-r--r-- 1 user 3855 Nov 24 18:58 milk.jpg

why there is so difference btw du -h and du-bh? which command is used from Cpanel to read disk space usage?

thanks
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
du -b won't necessarily give you the amount of quota space used on disk, you'll only get that using du on its own which is what I'd guess cPanel uses, but you'd have to ask them that since it's closed source. They may not use du and simply get the size using a directory trawl of all the files and adding up their stat() size.
 

adapter

Well-Known Member
PartnerNOC
Sep 17, 2003
391
0
166
ok but i am the only one with this size difference? Joomla take 9mb on my pc and 20 on my server!!
 

grzeg

Member
Jul 8, 2004
7
0
151
I know it's been a while, but now I've got the same problem.
Is there anything I can do? How am I suppose to explain to my customer why there is such a big difference in disk usage?

First server ( FC3 - ~750 accounts ):
#du -sh mydir/
30M mydir/

Second server ( Centos 4.4 - new machine - 0 accounts ):
#du -sh mydir/
14M mydir/

What do you suggest? OS upgrading(I'd prefer not)?
Best regards
 
Last edited:

xMoDx

Member
Feb 18, 2007
8
0
151
I know it's been a while, but now I've got the same problem.
Is there anything I can do? How am I suppose to explain to my customer why there is such a big difference in disk usage?

First server ( FC3 - ~750 accounts ):
#du -sh mydir/
30M mydir/

Second server ( Centos 4.4 - new machine - 0 accounts ):
#du -sh mydir/
14M mydir/

What do you suggest? OS upgrading(I'd prefer not)?
Best regards
what i want to display like...

#du -sh /home/

14m site1
1m site2
3m site3
15m site4


is that posible?? and how??


- thanks in advance