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
?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:
So run quotacheck from your boot scripts (should be in there already), and lose the cron job.
As I know quotacheck should be run regularly from cron (quotachech -ug /home) in order to check aquota.user and aquota.group files.