I use

quotacheck -m /home

in cron.daily to check quota everyday. The server OS is CentOS-5.3. I am getting error

quotacheck: Quota for users is enabled on mountpoint /home so quotacheck might damage the file.
Please turn quotas off or use -f to force checking.

since last few days in logwatch and even on manually running the command. Should I use -f or there is some better way to keep quota files accurate. I felt quota files were not being updated at all until I call quotacheck. Can kernel automatically update quota files when file size changes?


Did you read the manpage of quotacheck?

It is strongly recommended to run quotacheck with quotas turned off for the filesystem. Otherwise, possible damage or loss to data in the quota files can result. It is also unwise to run quotacheck on a live filesystem as actual usage may change during the scan.


-f, --force

Forces checking and writing of new quota files on filesystems with quotas enabled. This is not recommended as the created quota files may be out of sync.

So do not run it on a live filesystem. At any rate, why are you running it in cron.daily? quotacheck is only necessary if the quota data may be out of sync with the filesystem, usually after a fs crash, or if the fs was used without quotas.

During normal usage, the quotas are updated automatically, there's no need to run quotacheck regularly.

Manpage again:

quotacheck should be run each time the system boots and mounts non-valid filesystems.

So run quotacheck from your boot scripts (should be in there already), and lose the cron job.

  • Thanks for the answer. I thought it is not updating so created a cron job for updation. Since quotacheck was not running due to warning since last two three days, I tried to run first repquota -a. Then quotacheck -fm /home. Then again repquota -a. Both repquota -a reported exact same usage. So Kernel is updating quotas without need to call quotacheck regularly. I have removed quotacheck from cron now. – Saurabh Barjatiya Jul 16 '09 at 8:36

As I know quotacheck should be run regularly from cron (quotachech -ug /home) in order to check aquota.user and aquota.group files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.