/forcequotacheck, quotacheck after fsck errors corrected and automatic
convertquota from old version - functionality which is implemented in
/etc/rc.d/rc.sysinit - do not work.
A block of commands which tries to do this, the one starting with
# Update quotas if necessary
is too early in rc.sysinit. When it is run a "/" filesystem is mounted read only
and there is no other local filesystem mounted. Quotacheck decides which
filesystems need to be checked from /etc/mtab, and it needs read write access
(AFAIK it remounts a filesystem read-only, computes quota, remounts it
read-write and writes its files). Also convertquota needs rw access to filesystem.
It should be run just after
# Mount all other filesystems (except for NFS and /proc ...)
block, when all local filesystems are mounted rw.
Also it should not use "-R" option, as it skips "/" filesystem, even when it
needs quotas. If run when proposed nothing has any file open rw in "/", as it is
just remounted rw, so it can remount it back ro, do its work, and remount rw
again - there is no need to skip it.
Version-Release number of selected component (if applicable):
initscripts-8.45.14.EL-1.el5.centos.1 (CentOS5, so also RedHat5)
Steps to Reproduce:
1. Enable quotas in /etc/fstab on any local filesystem (add options: usrquota,
2. touch /forcequotacheck
Reboot is fast, no quotas computed and quota support is disabled, as it needs
aquota.user and aquota.group files present.
Reboot is slow, as it needs to recompute quotas, aquota.user and aquota.group
files are created, quota support is enabled.
I'm attaching a patch which does just this.
Introduction of /forcequotacheck: bug #150857, bug #168118
Created attachment 159638 [details]
Move quotacheck after mounting local filesystems, disable skipping of root filesystem
Created attachment 159696 [details]
patch for this
Here's what's going into 8.55-1; it moves it as you suggest, but also removes
the frighteningly obsolete convertquota stuff (which hasn't even been pointing
to the right path for convertquota for about three years now.)