Quota is started AFTER several deamons is already running (postfix, mysql etc.) - and these open/locks files on the filesystem, preventing quotacheck in the initscript to run. Reproducible: Always Steps to Reproduce: 1. Install quota and some deamon, for instance postfix. 2. Set quota on the partition, on which postfix is locking files (for instance /var). 3. Initialize the quota-file: "rm -f /var/aquota.user; touch /var/aquota.user; chmod 600 /var/aquota.user". 4. Reboot. Actual Results: Quotacheck fails during boot. Quote: "quotacheck: Cannot remount filesystem mounted on /var read-only so counted values might not be right. Please stop all programs writing to filesystem or use -m flag to force checking." Expected Results: Quota should be turned on BEFORE other software begin to use files on the partitions. This way, it can initialize the aquota.user file correctly. Adding a "before *" to the init-script /etc/init.d/quota from: depend() { need localmount } to: depend() { need localmount before * } seems to do the trick - at least for me. Could you please include this change in the package? I've marked this bug "Major", since it prevents me for using quota on several partitions.
The change mentioned above results in a warning when updating packages ("emerge -uD world"), see the last two *s below: * Caching service dependencies... * Services 'quota' and 'checkroot' have circular * dependency of type 'ibefore'; continuing... [ ok ] I don't know if this is a problem, and if so, how to work around it...
Adding quota to the boot runlevel, instead of the default runlevel, seems to do wonders (without altering the init-script). So, use: "rc-update add quota boot" And NOT "rc-update add quota default" as stated in the "Gentoo Linux Security Guide" (Code listing 6.5).
Thanks. I've updated the security guide in CVS.
Bug closed