The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Disk space usage mismatch

Discussion in 'General Discussion' started by crazyfish, Sep 15, 2010.

  1. crazyfish

    crazyfish Member

    Joined:
    Oct 11, 2007
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I've run into an issue that I can't figure out, WHM reports the disk space used as about 5200mb but one of the folders in that account has 12GB of data and the total size of the account on the server is 16GB so why is there such a big difference in the reported size?
     
  2. yapluka

    yapluka Well-Known Member

    Joined:
    Dec 24, 2003
    Messages:
    301
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    France
    cPanel Access Level:
    Root Administrator
    Check that all files are actually owned by the account username. If they are owned by "nobody", for example, they wouldn't count against the owner.
    In this case, run this command in cli :
    chown -R username.username /home/username/public_html/*
     
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Use find to pinpoint all relevant files and directories and then take precise action

    Cautionary Warning: I would not recommend performing a recursive ownership modification in the manner described. Instead, please consider using "find" to search for files not owned by the applicable user, and then decide if any action is necessary. Blindly applying recursive ownership can have undesired consequences.

    Suggested Alternative: Via SSH access, I recommend using "find" to locate files and directories not owned by the user that you expect to own them; in these examples, simply replace "$username" with the desired cPanel account username:
    Code:
    # find ~$username/public_html ! -user $username -print
    # find ~$username/public_html ! -user $username -exec ls -adl '{}' \;
    # find ~$username/public_html ! -user $username -exec stat '{}' \;
    Verbose usage information in the manual "man" page (documentation) for the "find" utility is accessible using the following command via SSH access:
    Code:
    # man find
     
  4. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Inspect all possible sources of disk usage to accurately identify quota discrepancies

    I recommend checking what is reported by the file system disk quotas; this is a potential source for disk quota discrepancies. When comparing disk usage and quota information, please also consider and take into account the disk space used by databases (as displayed in cPanel) as well as disk usage from all other file systems that have quota support enabled.

    The following command should output file system disk quota information that is used by cPanel and the output can be compared to the displayed disk usage; in this example simply replace "$username" with the applicable cPanel login username:
    Code:
    # /usr/bin/quota -v $username
    The following commands should report file system disk quota information that is used by WebHost Manager (WHM); the disk space used and quota limits from each command should closely match if not exactly:
    Code:
    # /usr/sbin/repquota -auv
    # cat /var/cpanel/repquota.cache
    # /scripts/dumpstor /var/cpanel/repquota.datastore
    The following command may be used to determine if databases are included in disk usage calculations performed by cPanel and WHM:
    Code:
    # grep disk_usage_include_sqldbs /var/cpanel/cpanel.config
     
  5. crazyfish

    crazyfish Member

    Joined:
    Oct 11, 2007
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    I've determined that the folder in question is used to upload images for an image hosting site. I'm having a bit of trouble working with the folder that has ~60000+ files in it. But I think it is a problem with the owner being "nobody".
     
Loading...

Share This Page