Bug 921806 - quotaon not called when quotas are set for the root file system in /etc/fstab
Summary: quotaon not called when quotas are set for the root file system in /etc/fstab
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 922206
TreeView+ depends on / blocked
 
Reported: 2013-03-15 00:52 UTC by Rob Millner
Modified: 2015-02-17 14:51 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-02-17 14:51:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
output of systemctl dump (289.79 KB, text/plain)
2013-03-26 18:54 UTC, Rob Millner
no flags Details
output of dmesg after enabling verbose output (163.58 KB, text/plain)
2013-03-26 18:55 UTC, Rob Millner
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 736360 0 unspecified CLOSED FIXED_IN_GIT: Systemd does not run 'quotacheck' nor 'quotaon' 2021-02-22 00:41:40 UTC

Internal Links: 736360

Description Rob Millner 2013-03-15 00:52:53 UTC
Description of problem:
OpenShift uses journalled file system quotas for resource management.  We noticed our quota tests began failing on our Fedora 18.

On a fresh boot, quotas are not enabled even though they are defined for the root file system in /etc/fstab.

This problem occurs on a vanilla Fedora 18 minimal install as well as the official EC2 image when updates are applied.


Version-Release number of selected component (if applicable):
systemd-197-1.fc18.2.x86_64

How reproducible:
Always

Steps to Reproduce:

Perform all of the following steps as root.

1. Ensure that the quota utilities are installed and the node is up to date.
   yum -y upgrade
   yum -y install quota

2. Add the following options to the root file system in /etc/fstab:
   usrjquota=aquota.user,jqfmt=vfsv0

3. Remount root
   mount -o remount / 

4. Build quota files in the root file system
    quotacheck -cmuf /

5. Enable quotas
    quotaon -a

6. verify that quotas are enabled
    quotaon -u -p /

7. reboot

8. verify that quotas are enabled
    quotaon -u -p /


Actual results:
user quota on / (/dev/xvda1) is off


Expected results:
user quota on / (/dev/xvda1) is on


Additional info:

The full line for root in /etc/fstab:
LABEL=_/   /         ext4    defaults,usrjquota=aquota.user,jqfmt=vfsv0        1 1

Comment 1 Rob Millner 2013-03-15 00:58:38 UTC
Relevant entries from the EC2 console output:

[1310798.049028] EXT4-fs (xvda1): mounted filesystem with ordered data mode. Opts: (null)
[1310798.189644] EXT4-fs (xvda1): mounted filesystem with ordered data mode. Opts: usrjquota=aquota.user,jqfmt=vfsv0

Comment 2 Lennart Poettering 2013-03-22 15:45:18 UTC
I figure systemd currently doesn't check for "usrjquota" as mount option to run qotaon for.

Comment 3 Rob Millner 2013-03-22 17:47:45 UTC
It looks like the check for usrjquota is in there.

$ rpm -q systemd
systemd-197-1.fc18.2.x86_64

Expanding systemd-197-1.fc18.2.src.rpm and doing an "rpmbuild -bp" on it.

src/core/mount.c, 'needs_quota', lines 344 through 348:

        return mount_test_option(p->options, "usrquota") ||
        	mount_test_option(p->options, "grpquota") ||
                mount_test_option(p->options, "quota") ||
                mount_test_option(p->options, "usrjquota") ||
                mount_test_option(p->options, "grpjquota");


I dug into the mount_test_option. A stand-alone C program that calls hasmntopt on a properly populated mntent struct from the /etc/fstab entry can find "usrjquota" in the options.

I'll look into getting more debug info out of systemd around this call and see what's going on.

Comment 4 Rob Millner 2013-03-26 18:54:54 UTC
Created attachment 716681 [details]
output of systemctl dump

Comment 5 Rob Millner 2013-03-26 18:55:45 UTC
Created attachment 716683 [details]
output of dmesg after enabling verbose output

Comment 6 Rob Millner 2013-03-26 18:58:23 UTC
It appears as though the quotacheck and quotaon services are being requested by the root mount but they do not seem to take affect.

# quotaon -u -p /
user quota on / (/dev/xvda1) is off

From "systemctl dump"...
-> Unit quotaon.service:
        Description: Enable File System Quotas
        Instance: n/a
        Unit Load State: loaded
        Unit Active State: inactive
 ...
        WantedBy: -.mount
        Before: local-fs.target
        Before: shutdown.target
        After: -.mount
...
        Service State: dead
        Result: success
        Reload Result: success

Comment 8 Fedora End Of Life 2013-12-21 12:09:52 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Fedora End Of Life 2015-01-09 17:46:20 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Fedora End Of Life 2015-02-17 14:51:56 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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