quotacheck
. However, quotacheck
can be run on a regular basis, even if the system has not crashed. Safe methods for periodically running quotacheck
include:
/etc/cron.daily/
or /etc/cron.weekly/
directory—or schedule one using the crontab -e
command—that contains the touch /forcequotacheck
command. This creates an empty forcequotacheck
file in the root directory, which the system init script looks for at boot time. If it is found, the init script runs quotacheck
. Afterward, the init script removes the /forcequotacheck
file; thus, scheduling this file to be created periodically with cron
ensures that quotacheck
is run during the next reboot.
cron
, refer to man cron
.
quotacheck
is to (re-)boot the system into single-user mode to prevent the possibility of data corruption in quota files and run the following commands:
quotaoff -vaug /file_system
quotacheck -vaug /file_system
quotaon -vaug /file_system
quotacheck
on a machine during a time when no users are logged in, and thus have no open files on the file system being checked. Run the command quotacheck -vaug file_system
; this command will fail if quotacheck
cannot remount the given file_system
as read-only. Note that, following the check, the file system will be remounted read-write.
quotacheck
on a live file system mounted read-write is not recommended due to the possibility of quota file corruption.
man cron
for more information about configuring cron
.