Process to fix errors in quota
To fix these errors you simply need to use the quotacheck command to rebuild the quota databases. Basic quotacheck usage is simple. First you disable quotas using the "quotaoff" command, then delete (or rename) the existing quota database (the files called quota.user and quota.group), then use quotacheck to rebuild the database, then turn quotas back on with the "quotaon" command. For example:
quotaoff -av
mv /aquota.user /aquota.user.bak
mv /aquota.group /aquota.group.bak
quotacheck -agiuv
quotaon -av
Note that this is an example only. The exact location of your aquota.user and aqouta.group may vary and these files may be called simply quota.user and quota.group. You may also have more than one copy of these files if you have quotas enabled for more than one filesystem. Check in /etc/fstab to see which filesystems have quotas enabled. Filesystems with quotas enabled will have the usrquota and grpquota options turned on. So, for example, if your /etc/fstab has lines like these in it
LABEL=/ / ext3 usrquota,grpquota,defaults 1 1
/dev/hda3 /home ext3 defaults 1 2
Then your / and /home filesystems have quotas enabled and there will be two sets of aquota files to delete or rename: /aquota.* and /home/aquota.*
Try to rebuild quotas when the server is not busy, and, if you can, shutdown httpd, ftp and other non-essential services so that nothing is trying to change the files on disk while the quotas are being rebuilt. It is not absolutely necessary to run quotacheck on an inactive system, but if there is activity then errors can creep into the disk space usage count. Shutting down the system services will also help the quotacheck to run faster.
|