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.

Quotas never get updated

Discussion in 'General Discussion' started by Jeff75, Mar 7, 2005.

  1. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    16
    For some reason about a month ago, the quotas on my server stopped updating automatically. The only way that they get updated now is if I manually run quotacheck -av. Can someone tell me how to fix this and let me know if there is anyway that I can get it to run every hour?
     
  2. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    Did you compile and install a new kernel around about a month ago?

    What Operating system are you using?

    If you type

    # quota

    or

    # quota $user

    That will tell you if the quota process is running.

    If quota isn't running, you may have left the quota option out of your new kernel, if you have recently compiled a new kernel. Fix for that is to compile the kernel with quota support and reboot, then rebuild the quotas if necessary.

    Try the following and report what happens

    /scripts/initquotas

    /scripts/fixquotas

    or on Linux

    Check that the partitions are mounted for quota reporting (usrquota) in /etc/fstab

    Then

    # quotaoff -auvg

    # cd /

    # rm -f aquota.user quota.user /home/aquota.user /home/quota.user /var/aquota.user /var/quota.user /usr/aquota.user /usr/quota.user

    # touch aquota.user quota.user /home/aquota.user /home/quota.user /var/aquota.user /var/quota.user /usr/aquota.user /usr/quota.user

    chmod 600 aquota.user quota.user /home/aquota.user /home/quota.user /var/aquota.user /var/quota.user /usr/aquota.user /usr/quota.user

    # quotacheck -auvgfm

    # quotaon -auvg

    /scripts/resetquotas
     
    #2 DigitalN, Mar 7, 2005
    Last edited: Mar 7, 2005
  3. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    16
    I'm running FreeBSD 4.8. I ran quota and it said "Disk quotas for user root (uid: 0): none". Then I ran quota USERNAME and it showed the Disk quotas for user USERNAME.

    I then ran /scripts/initquotas and it said No filesystems are mounted with quota support. Under freebsd you must edit /etc/fstab and turn on quotas.

    I only have one partition on my server as I did not want it set up with multiple partitions.
     
  4. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    In true FreeBSD style

    man quota

    http://www.freebsd.org/cgi/man.cgi?...ion=0&manpath=FreeBSD+4.8-RELEASE&format=html

    man fstab

    http://www.freebsd.org/cgi/man.cgi?...ion=0&manpath=FreeBSD+4.8-RELEASE&format=html

    man quotacheck

    http://www.freebsd.org/cgi/man.cgi?...ion=0&manpath=FreeBSD+4.8-RELEASE&format=html

    man edquota

    http://www.freebsd.org/cgi/man.cgi?...ion=0&manpath=FreeBSD+4.8-RELEASE&format=html

    Does your current /etc/fstab file contain the quota options?
    Did you rebuild the kernel recently on the machine and did you add the quota option into the kernel?
     
  5. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    16
    Here are the contents of /etc/fstab:

    Code:
    # See the fstab(5) manual page for important information on automatic mounts
    # of network filesystems before modifying this file.
    #
    # Device                Mountpoint      FStype  Options         Dump    Pass#
    /dev/da0s1b             none            swap    sw              0       0
    /dev/da0s1a             /               ufs     rw,userquota,groupquota         1       1
    proc                    /proc           procfs  rw              0       0
    I'm pretty sure the kernel on this server hasn't been rebuilt for at least 12 months.
     
  6. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    Have you tried

    # quotaon -a

    To turn quota on?

    Then run fixquotas (if needed)

    Do you have

    enable_quotas="YES"

    in /etc/rc.conf

    Maybe the server was rebooted and the option isn't in rc.conf

    Hope this helps :)
     
  7. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    16
    I ran the commands you listed and yes, quota_enabled="YES" is in the /etc/rc.conf file. I guess I just need to upload some files on an account and check to see if the quota changed after a half a day or so.

    Do you know how I can make it so it will check users' quotas every hour?
     
  8. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Cronjob is one of the options!
     
  9. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    16
    Now it seems to be updating the quotas in real-time! Great! Thanks for your help!
     
  10. easyhoster1

    easyhoster1 Well-Known Member

    Joined:
    Sep 25, 2003
    Messages:
    659
    Likes Received:
    0
    Trophy Points:
    16

    FREEBSD quotas will break sometimes when you reboot. If you do, run the following

    quotasoff -av
    then
    quotaon -av

    Then
    /scripts/fixquotas

    This will correct it
     
Loading...

Share This Page