quotaon@<mount>.service fails with 'File exists' on non-root ext4 filesystems that already have the on-disk quota feature
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 15/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- linux, python
- Domain
- devops, operating-systems
Research direction
Start with e_fstab.py's check_quota_features() and mask_redundant_quotaon_units(), then inspect commit 5bb7f7e and its merged result 5444a89. The issue reports the fix as released in 7.4.17, so done means verifying that the non-root unit is masked without regressing external aquota handling; no implementation remains.
Written by the indexing model from the issue text.
Description
Description
After a fresh linuxmuster-setup run, [email protected] fails at every boot:
× [email protected] - Enable File System Quotas
Active: failed (Result: exit-code)
Process: 976 ExecStart=/usr/sbin/quotaon -ug /srv (code=exited, status=2)
quotaon[976]: quotaon: using . on /dev/sdb1 [/srv]: File exists
quotaon[976]: quotaon: using . on /dev/sdb1 [/srv]: File exists
systemd[1]: [email protected]: Main process exited, code=exited, status=2/INVALIDARGUMENT
systemd[1]: Failed to start [email protected] - Enable File System Quotas.
Root cause
/srv (/dev/sdb1) came out of curtin/mke2fs with the modern ext4 on-disk
quota feature (tune2fs -O quota) already enabled - confirmed from the
customer's setup log:
#### Checking quota feature on /dev/sda2 ....................... Enabled! ####
#### Checking quota feature on /dev/sdb1 ....................... Enabled! ####
Both root (/dev/sda2) and /srv (/dev/sdb1) already had the feature
active before linuxmuster-setup ever ran, so e_fstab.py's
check_quota_features() never called enable_ext4_quota() for either.
Once the on-disk feature is active, the kernel auto-activates quota
tracking as soon as the filesystem is mounted - before any quotaon call
runs. e_fstab.py's own mask_redundant_quotaon_units() already handled
this for root (masking quotaon-root.service/quotaon.service), but
assumed root was the only filesystem that could ever have the on-disk
feature ("it's the only filesystem that ever gets the on-disk feature
here"). That assumption doesn't hold on installers/images whose mke2fs
defaults already bake the quota feature into every ext4 filesystem, not
just root - so systemd's own generated [email protected] unit is left
unmasked and keeps trying (and failing) to turn on what the kernel already
turned on, at every boot.
Fix
Fixed by 5bb7f7e (fix/quotaon-nonroot-ondisk-quota, merged in 5444a89):
mask_redundant_quotaon_units() now takes the ext4_mounts list and, for
every non-root mount whose device already has the on-disk quota
feature (checked via tune2fs -l), masks that mount's specific
quotaon@<escaped-mount>.service instance (name resolved via
systemd-escape --path). Mounts still on the older external
aquota.user/aquota.group mechanism are left untouched, since those
genuinely need quotaon to run after every boot.
Released in 7.4.17.
Remediation for already-affected installs
The fix only takes effect on the next full linuxmuster-setup run, which
isn't something to ask a customer to redo just for this. Manual
workaround for an already-provisioned server:
# quota is already active kernel-side regardless of the failed unit
quotaon -p -u /srv
quotaon -p -g /srv
repquota /srv
sudo systemctl mask [email protected]
sudo systemctl reset-failed [email protected]
🤖 Generated with Claude Code
- Dominant language
- Python
- Stars
- 13
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from linuxmuster/linuxmuster-base7
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
linuxmuster/linuxmuster-base7#206 · 2 comments ·
-
linuxmuster-release-upgrade: fix networkd-wait-online typo, stop masking systemd-resolved wholesaleOpen
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
linuxmuster/linuxmuster-base7#203 · 4 comments ·
-
Support Ubuntu 26.04Open7.4
Difficulty 4/5 3-5 days Newbie friendliness 30/100
linuxmuster/linuxmuster-base7#172 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
linuxmuster/linuxmuster-base7#152 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
linuxmuster/linuxmuster-base7#151 · 2 comments ·
All issues in linuxmuster/linuxmuster-base7
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
raullenchai/Rapid-MLX#4042 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
LearningCircuit/local-deep-research#7067 ·
Maintainers usually reply within 1 day
-
#bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
apache/superset#44923 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
lawndoc/stack-back#123 ·