Bug 249003

Summary: /forcequotacheck and quotacheck after fsck errors corrected do not work
Product: [Fedora] Fedora Reporter: Tomasz Ostrowski <tometzky+redhat>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 7CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-20 21:04:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Move quotacheck after mounting local filesystems, disable skipping of root filesystem
none
patch for this none

Description Tomasz Ostrowski 2007-07-20 09:37:43 UTC
/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:
Always

Steps to Reproduce:
1. Enable quotas in /etc/fstab on any local filesystem (add options: usrquota,
grpquota)
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 09:37:43 UTC
Created attachment 159638 [details]
Move quotacheck after mounting local filesystems, disable skipping of root filesystem

Comment 2 Bill Nottingham 2007-07-20 21:01:52 UTC
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.)