Bug 249003 - /forcequotacheck and quotacheck after fsck errors corrected do not work
/forcequotacheck and quotacheck after fsck errors corrected do not work
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-07-20 05:37 EDT by Tomasz Ostrowski
Modified: 2014-03-16 23:07 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-07-20 17:04:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Move quotacheck after mounting local filesystems, disable skipping of root filesystem (2.02 KB, patch)
2007-07-20 05:37 EDT, Tomasz Ostrowski
no flags Details | Diff
patch for this (1.60 KB, patch)
2007-07-20 17:01 EDT, Bill Nottingham
no flags Details | Diff

  None (edit)
Description Tomasz Ostrowski 2007-07-20 05:37:43 EDT
/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.54.1-1 (F7)
initscripts-8.45.14.EL-1.el5.centos.1 (CentOS5, so also RedHat5)

How reproducible:

Steps to Reproduce:
1. Enable quotas in /etc/fstab on any local filesystem (add options: usrquota,
2. touch /forcequotacheck
2. Reboot
Actual results:
Reboot is fast, no quotas computed and quota support is disabled, as it needs
aquota.user and aquota.group files present.

Expected results:
Reboot is slow, as it needs to recompute quotas, aquota.user and aquota.group
files are created, quota support is enabled.

Additional info:
I'm attaching a patch which does just this.
Introduction of /forcequotacheck: bug #150857, bug #168118
Comment 1 Tomasz Ostrowski 2007-07-20 05:37:43 EDT
Created attachment 159638 [details]
Move quotacheck after mounting local filesystems, disable skipping of root filesystem
Comment 2 Bill Nottingham 2007-07-20 17:01:52 EDT
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.)

Note You need to log in before you can comment on or make changes to this bug.