Quota update not working – WHM/CPanel

Today I came across an issue where a customer was unable to change quota values for a client from WHM. Every time when the value is changed from WHM it will revert back to the old value. simply, the quota update was not working. Then I tried the fixquotas script (running fixquotas script as root user will fix common quota problems) which didn’t work and I got output as follows,
# /scripts/fixquotas
Installing Default Quota Databases……Done
Linux Quota Support
Quotas are now on
Resetting quota for user1 to 500 M
edquota: Quota write failed (id 502): Invalid argument
Resetting quota for user2 to 500 M
edquota: Quota write failed (id 528): Invalid argument
Resetting quota for user3 to 100 M
edquota: Quota write failed (id 504): Invalid argument
……..

Running quotacheck was the fix for the issue : 

# quotacheck -vguma

(quotacheck  examines  each  filesystem, builds a table of current disk usage, and compares this table against that recorded in the disk quota file for the filesystem (this step is ommitted if option -c is specified).

Options :

-v   quotacheck reports its operation as it progresses. Normally it operates              
     silently. If the option is specified twice, also the current directory is
     printed (note that printing can slow down the scan measurably).
-u   Only user quotas listed in /etc/mtab or on the filesystems specified are to
     be checked. This is the default action.
-g   Only group quotas listed in /etc/mtab or on the filesystems specified are to
     be checked.
-m   Do not try to remount filesystem read-only.
-a   Check all mounted non-NFS filesystems in /etc/mtab

It took some time to complete. Once it got completed, I re-run the  fixquotas script and worked fine. Finally, the quota values got updated.

About Sarath

A Techie from Kochi, India with 8+ years of experience in Linux and Windows server administration. I learn new things almost everyday and I enjoy the fun of learning and sharing my knowledge.

Related Posts

COMMENTS

Leave a Reply

Your email address will not be published. Required fields are marked *