Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Account over quota issue

Discussion in 'General Discussion' started by boing, Oct 19, 2017.

  1. boing

    boing Member

    Joined:
    May 4, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    Hello,

    Pre-diagnosis: I've already run:
    /scripts/fixquotas

    On cpanel's quota page:
    Home »Account Information »Show Accounts Over QuotaDocumentation

    I've got an account listed as:
    12521.73 MB

    For files, I can see:
    root@--- [/home]# du -sm /home/{username}
    5765 /home/***

    and under /var/lib/mysql I see about 1 GB worth of databases that belong to that user. Heck, check this out:
    root@bounce [/var/lib/mysql]# du -sm /var/lib/mysql
    1308 /var/lib/mysql

    So even if ALL of those databases belong to that user (they don't), we're still at about 7 GB. Nowhere near the ~12.5GB cpanel is reporting. Where else should I be looking for files at?

    Thanks!
     
  2. cPWilliamL

    cPWilliamL cP Technical Analyst II
    Staff Member

    Joined:
    May 15, 2017
    Messages:
    257
    Likes Received:
    29
    Trophy Points:
    103
    Location:
    America
    cPanel Access Level:
    Root Administrator
    Perhaps this account has large mailing lists? Do you see the user in `/var/cpanel/datastore/mailman-disk-usage' with large usage?
     
  3. boing

    boing Member

    Joined:
    May 4, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    Thank you for the reply and thought. I don't think so. In fact, this doesn't even narrow it down to a user and is really small:


    root@--- [/var/cpanel]# du -sm /var/cpanel/datastore
    1 /var/cpanel/datastore
     
  4. boing

    boing Member

    Joined:
    May 4, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    Any other ideas? I've got several accounts that are suddenly reporting at/near quota that I cannot account for when I inspect the directories mentioned above. I happen to be picking on the one mentioned above, but several are in that boat. (Some accounts I've had to artificially inflate, so to speak.)
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,734
    Likes Received:
    1,706
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It's possible files owned by this user exist outside it's home directory. You can obtain a list of files owned by the user with commands such as:

    Code:
    id username
    find / -uid $UIDNUMBER > /root/username.output
    Thank you.
     
  6. boing

    boing Member

    Joined:
    May 4, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    Hello,

    Still no luck. (Thanks for the tip though!)

    Even after that, and not even narrowing down some of these directories to just that user, I've only got:
    Code:
    root@--- [~]# du -sm /tmp/ /var/spool/mail/ /etc/vfilters/ /etc/vdomainaliases/ /etc/valiases/ /home/username/
    1       /tmp/
    1       /var/spool/mail/
    1       /etc/vfilters/
    1       /etc/vdomainaliases/
    1       /etc/valiases/
    5766    /home/username/
    root@--- [~]#
    
    (I did exclude things like /home/virtfs/*, which is correct to do, ya?)

    Yet cpanel is reporting 12522.11 MB used.
     
  7. boing

    boing Member

    Joined:
    May 4, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    By the way, that was after doing:

    Code:
    root@--- [~]# id username
    uid=514(username) gid=524(username) groups=524(username)
    
    followed by:
    Code:
    root@--- [~]# find / -uid 514 > /root/username.filelist
    
    And then examining that /root/username.filelist file.

    Running against the group id number yielded nothing.
     
  8. akust0m

    akust0m Well-Known Member

    Joined:
    Feb 19, 2016
    Messages:
    55
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Melbourne
    cPanel Access Level:
    Root Administrator
    Hey, not sure if it will help. But just in case the usage is incorrectly reported, you could try clearing and building the disk usage cache for this user to make sure?

    cpapi2 --user=username DiskUsage clearcache
    cpapi2 --user=username DiskUsage buildcache
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,734
    Likes Received:
    1,706
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Feel free to open a support ticket using the link in my signature so we can take a closer look.

    Thank you.
     
  10. boing

    boing Member

    Joined:
    May 4, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    Hello akust0m,

    Hrm... all sorts of errors with that. Thoughts?

    Code:
    root@--- [~]# cpapi2 --user=MyUserName DiskUsage clearcache
    [2017-10-27 09:34:17 -0700] warn [cpanel] Failed to write â/home/MyUserName/.cpanel/caches/filesys/~â
                                                                                                            Cpanel::Filesys::__ANON__(Cpanel::Exception::IO::WriteError=HASH(0x40ef000)) called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 119
            Try::Tiny::try(CODE(0x40ee958), Try::Tiny::Catch=REF(0x1a01cd8)) called at /usr/local/cpanel/Cpanel/Filesys.pm line 121
            Cpanel::Filesys::disk_space_check("/", 1) called at cpanel.pl line 772
            cpanel::cpanel::script("cpanel::cpanel", "--json-fast-connect", "--stdin") called at cpanel.pl line 272
    [2017-10-27 09:34:17 -0700] warn [cpanel] Failed to write â/home/MyUserName/.cpanel/caches/filesys/~home~MyUserNameâ
                                                                                                                            Cpanel::Filesys::__ANON__(Cpanel::Exception::IO::WriteError=HASH(0x40eedd8)) called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 119
            Try::Tiny::try(CODE(0x40ef048), Try::Tiny::Catch=REF(0x40ee838)) called at /usr/local/cpanel/Cpanel/Filesys.pm line 121
            Cpanel::Filesys::disk_space_check("/home/MyUserName", 1) called at cpanel.pl line 773
            cpanel::cpanel::script("cpanel::cpanel", "--json-fast-connect", "--stdin") called at cpanel.pl line 272
    ---
    cpanelresult:
      apiversion: 2
      data:
        -
          status: 1
          statusmsg: cache cleared
      event:
        result: 1
      func: clearcache
      module: DiskUsage
    root@--- [~]#
    
    
    The buildcache produced similar errors and cpanel results. I ran both commands, then ran both again in case something was corrupt the first time through. (and of course replaced MyUserName with the actual username in the snippet above)

    After doing so, cpanel still reports this user as using ~2.5x more data than it appears to be using. I then ran:
    /scripts/fixquotas

    And still the same, cpanel still reports this user as using ~2.5x more data than it appears to be using.
     
  11. boing

    boing Member

    Joined:
    May 4, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    Hello,

    Thanks. I think I'll have to at this point.

    Thanks,
    -Jeremy
     
Loading...

Share This Page