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.

Wierd quota anomoly

Discussion in 'General Discussion' started by net3media, May 27, 2003.

  1. net3media

    net3media Member

    Joined:
    Mar 4, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    We have serveral clients (about 20) that are effected by a misreporting of the actual usage.

    One in particular shows 15megs of storage used. However, a du of the user directory shows only 512K.

    I did a find -user username, but found no stray files anywhere on the server.

    The stats and logs have been deleted and there is only a single index file in the www.

    I ran the fixquota, suspended/unsuspended etc. Nothing works. It still displays 15 megs used.

    What am I missing here? Any ideas?

    cPanel.net Support Ticket Number:
     
  2. Host4u2

    Host4u2 Well-Known Member

    Joined:
    Mar 24, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
    Here's a stab in the dark thinking of a simular problem I had.

    Check his email boxes. I had a client with 35 MB of mail in WebMail Trash because he never emptied it.

    cPanel.net Support Ticket Number:
     
  3. net3media

    net3media Member

    Joined:
    Mar 4, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Already did that. :(

    cPanel.net Support Ticket Number:
     
  4. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    You can see all files the user owns by running

    find / -user [username] -type f -exec ls -la {} ';'

    Replace [username] with the actual username

    cPanel.net Support Ticket Number:
     
  5. net3media

    net3media Member

    Joined:
    Mar 4, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1

    Yes. Nothing out of the ordinary.

    cPanel.net Support Ticket Number:
     
  6. dariofg2

    dariofg2 Well-Known Member

    Joined:
    Mar 7, 2003
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    I'm getting misreported quotas as well on two of my servers. You should do a

    /scripts/fixquotas

    But that's only temporary, quotas are not being updated properly when user files change...

    -Dario

    cPanel.net Support Ticket Number:
     
  7. trakwebster

    trakwebster Well-Known Member

    Joined:
    Jan 29, 2003
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    16
    There is quite a bit of quota related threads available via search on this forum, and on Webhostingtalk.com

    I had a problem with many folks accounts reporting lots more than expected, and it turned out to be counting files in a backup.

    For starters, do this (from burstnet forum) --

    quota username (this finds the uid #, enter the username of account for username)

    find / -uid 12345 (enter the uid in place of 12345, this will find the location of all files on the server owned by that user)

    Nextly, examine your /etc/fstab, and for your own information see which directories are enabled for quota-counting, and which are not. The ones enabled will contain the word usrquota.

    In my case, all I had to do was to remove this word from my backup directory listing in fstab, and reboot. But be careful if editing /etc/fstab!

    Quota at first appears very mysterious, because it counts stuff by user id rather than just counting the home directory. And alas the man quota stuff is difficult reading. However, go to Redhat and do a search on quota, and it will pop up the Quota Mini-Howto, whcih is both short and clear.

    Most likely you have quota enabled on the / directory so that you can count up the mysql table size, for example. This is another source that won't show up in the user's home directory.

    If none of this helps, search for more on quota here and webhostingtalk.com

    Happy Hunting!

    cPanel.net Support Ticket Number:
     
  8. dariofg2

    dariofg2 Well-Known Member

    Joined:
    Mar 7, 2003
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    Thanks, trakwebster. But my quota system is really misreporting disk space usage. No missed files, I already checked. I have to manually ask for a recount when a user complains.

    I removed /home/(a)quota.user and ran /scripts/fixquotas. Let's see if that helps.

    As a note, all MySQL data files are owned by "mysql" user, so enabling quotas on / won't add the tables sizes to the used up space count.

    -Dario

    cPanel.net Support Ticket Number:
     
  9. acer2k

    acer2k Well-Known Member

    Joined:
    Nov 12, 2001
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    I am also having this problem. A user's files are only about 70MB but it is reporting as 100mb. Also, users quotas automatically are randomly being set to unlimited unless I run the fixquotas script to fix it all. It is somewhat a hassle to run everyday! :/

    cPanel.net Support Ticket Number:
     
  10. ZMan

    ZMan Member

    Joined:
    May 23, 2003
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    The basic problem lies in the fact that the UIDs of several 3rd party autoinstaller scripts included with some themes and their components still reflect file ownerships set from the system they were developed on. In other words, some of these UIDs in the low 500 range for example, will eventually match up with the UID of a user account you have created. When this occurs, all the miscellaneous autoinstaller scripts, etc, with a UID matching that of your newly created user, will be charged against that newly created user's disk quota.

    The fix can be tedious if you are not comfortable working from the shell prompt. You first need to find the conflicts using a command such as the following (replacing username with the real username)

    find / -user username -type f -exec du -hs {} \;


    Once you find the problem files and directories, as root, you will be able to chown them to some other non-conflicting UID.

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:
     
  11. dariofg2

    dariofg2 Well-Known Member

    Joined:
    Mar 7, 2003
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    Thanks, Zman. But it's really not a "files we don't know of" thing, it's a problem with the quota system. How do I know?

    1. user complains that his quota is over the limit, although he's just removed some files.
    2. I "du . -s" inside his home directory. Then I compare to what "quota" says. If it's very different, I proceed.
    3. Run "/scripts/fixquotas".
    4. I check du's output with quota's. It's much similar now!

    -Dario

    cPanel.net Support Ticket Number:
     
  12. ZMan

    ZMan Member

    Joined:
    May 23, 2003
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    I just want to clarify something. It sounds like we are talking about 2 similar problems. :)

    The problem I was remarking on was the one where a customer creates an account and before they even use it, it says they are using sometimes like 62 MB of disk space already. That particular problem is due to other files on the system with UIDs coincidental with this new user's UID.

    Now the other problem I know of is the one where the quotas display incorrectly. For example, a customer creates an account using a package with a disk quota of say 100MB, but the displayed quota is unlimited, or some other incorrect value. These cases are resolved by running /scripts/fixquotas. Why they happen in the first place though is a problem.

    cPanel.net Support Ticket Number:
     
  13. dariofg2

    dariofg2 Well-Known Member

    Joined:
    Mar 7, 2003
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    It seems my problem is different altogether. It's happening on old accounts, not the ones I open for new customers. And the displayed quotas are correct. What's not correct is the disk usage reported by Cpanel and the quota utility.

    What fixquotas does is not only correct the quota limits for all accounts based on their packages, but it also runs quotacheck, which recounts the used space.

    -Dario

    cPanel.net Support Ticket Number:
     
  14. dariofg2

    dariofg2 Well-Known Member

    Joined:
    Mar 7, 2003
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    Got it!!! Just received through bugtraq a security advisory from Red Hat, RHSA-2003:187-01, concerning the kernel version I was using, 2.4.20-13.7, which has quota problems. I'll install the latest version, that should fix it.

    -Dario

    cPanel.net Support Ticket Number:
     
  15. Host4u2

    Host4u2 Well-Known Member

    Joined:
    Mar 24, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
    Yup... that fixed it :D

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page