systemd[1]: Failed to start Enable File System Quotas

Daniel Rode daniel.x.rode at gmail.com
Fri May 20 12:44:10 BST 2022


Hello Michael and Michael,

I am facing some issue with using quota on Debian 11, namely I am
getting the "Failed to start Enable File System Quotas" error on
system boot. Initially I was using the quotacheck command to generate
the aquota.user file, but this was giving me a warning message:

"quotacheck: Your kernel probably supports ext4 quota feature but you
are using external quota files. Please switch your filesystem to use
ext4 quota feature as external quota files on ext4 are deprecated."

So for this I have followed steps described in the "Chapter 36.
Limiting storage space usage on ext4 with quotas" RedHat article [1]:

1. Installed quota package (apt install quota).
2. Enabled quota support on the existing filesystem (tune2fs -O quota
/dev/sdb1; tune2fs -Q usrquota /dev/sdb1)
3. Enabled quota enforcement by updating my /etc/fstab file
(UUID=<uuid>   /home   ext4   defaults,errors=remount-ro,usrquota   0
 2)
4. Set quota for individual user (edquota <username>)

It seems that all works fine (i.e. both soft and hard limits are
obeyed and give warning and error respectively) but during the system
boot I am getting the mentioned error.

debian:~# systemctl status quotaon
* quotaon.service - Enable File System Quotas
     Loaded: loaded (/lib/systemd/system/quotaon.service; static)
     Active: failed (Result: exit-code) since Fri 2022-05-20 12:40:48
CEST; 46min ago
       Docs: man:quotaon(8)
    Process: 618 ExecStart=/sbin/quotaon -aug (code=exited, status=1/FAILURE)
   Main PID: 618 (code=exited, status=1/FAILURE)
        CPU: 2ms

May 20 12:40:48 debian systemd[1]: Starting Enable File System Quotas...
May 20 12:40:48 debian quotaon[618]: quotaon: using . on /dev/sdb1
[/home]: File exists
May 20 12:40:48 debian systemd[1]: quotaon.service: Main process
exited, code=exited, status=1/FAILURE
May 20 12:40:48 debian systemd[1]: quotaon.service: Failed with result
'exit-code'.
May 20 12:40:48 debian systemd[1]: Failed to start Enable File System Quotas.

If I remove the "usrquota" from the fstab, the error is no longer
displayed, but quota is not enforced until I manually execute the
"quotaon -aug", which was supposed to be executed by the
quotaon.service; oddly enough it tries to execute it (but fails) if
there is the "usrquota" parameter in the /etc/fstab, but does not run
it if it is not there.

I was trying to find some answers on the Internet and I have seen your
discussion in the "Please remove quotacheck and quotaon service files"
bug report [2] (where it confused me greatly for a while seeing both
emails and replies to them signed as "Michael" ;) ) but it seems it
refers to the older version of the quota package and should have
already been fixed, and could not find anything appropriate.

I know I can "fix" this by removing/editing the
/lib/systemd/system/quotaon.service file but that is not a valid
approach, I believe.

Can you please point me to what I am doing wrong? Or how can I fix it?
Any help is greatly appreciated!

[1] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_file_systems/assembly_limiting-storage-space-usage-on-ext4-with-quotas_managing-file-systems
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=753939

Kind regards,
Daniel Rode



More information about the Pkg-systemd-maintainers mailing list