• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Issue Disk quota is not supported for ext4

pmg

Basic Pleskian
Server operating system version
Ubuntu 22.04
Plesk version and microupdate number
Plesk Obsidian 18.0.61.5
Hello,

It seems that quota is unsupported on new kernels for ext4. I get the following errors from Plesk:
CLI:
Code:
root@festive-cray:~# /usr/local/psa/admin/sbin/usermng --isquotable --path=/
usermng: Userquota is not enabled on device: /dev/sda1
usermng: Userquota is not enabled on device: /dev/sda1
1
Web UI:
Code:
The hard disk quota is not supported because of the server's file system configuration.

Steps to reproduce:
  1. Install latest Ubuntu 22.04 LTS using ext4 for root (/) partition (/dev/sda1 used in the example)
  2. Install and enable quotas:
    1. Update apt repos
      Code:
      sudo apt-get update
    2. Install user-space tools
      Code:
      sudo apt-get install quota
    3. Boot into rescue mode
    4. Enable quotas for ext4 root partition
      Code:
      tune2fs -O quota /dev/sda1
    5. Reboot back into normal mode
    6. Enable quota enforcement
      Code:
      quotaon /
  3. Verify quotas is working
    1. Create user and assign quota
      Code:
      PSA_PASSWD=testq3 /usr/local/psa/admin/sbin/usermng --add-user --user=testq3 --homedir=/home/testq3 --quota=100000 --shell=/bin/bash
    2. Verify settings
      Code:
      quota -v testq3
    3. Verify enforcement
      1. Code:
        su - testq3
      2. Code:
        dd if=/dev/zero of=upload_test bs=1M count=1
  4. Check Plesk using CLI:
    Code:
    /usr/local/psa/admin/sbin/usermng --isquotable
    usermng: Userquota is not enabled on device: /dev/sda1
    usermng: Userquota is not enabled on device: /dev/sda1
    1
I suppose Plesk still relies on deprecated quota management (i.e. using aquota.* files and mount flags).
 
I am not sure about deprecated. Using the steps from the guide for ext3 and a few modifications I had no problem enabling quota management on a Ubuntu 22.04 test server with ext4 file system.
Schermafbeelding 2024-06-06 214743.png
 
Not sure what kind of modifications you have made, but after executing:
Code:
quotaon -v /
I get the following message:
Code:
quotaon: 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.

Just to outline Linux message: external quota files on ext4 are deprecated
And Plesk ext3 guide: Make sure that the aquota format is used
 
Ah, I got you now. I think might have misunderstood your opening post.

So yes, Plesk does rely on using quota files and mount flags for quota management and does not (yet) supports the native ext4 (kernel) quota feature. That being said, even trough quota files on ext4 are deprecated it is an method that still can be installed on ext4 (at one's own peril).
 
Hi @Kaspar@Plesk ,

Unfortunately, it seems that deprecated also means unsupported and ignoring warnings doesn't do any good.
I was able to "turn on" quotas using old approach, but those are not enforced, so I'm not sure Plesk will benefit from such "configuration" even though it can detect "correct" filesystem configuration and enable check-box.
Right now I'm testing this, and I don't think it will work on the back-end at all.
Here's what I found out so far:
  1. I have followed your advice and "configured" (again) quotas as suggested by the Plesk guide you have suggested so I have / filesystem mounted with userquota/grpquota flags and "aquota" files created.
  2. I have "turned on" quota using "quotaon"
  3. I have created test user and assigned him 100/110 blocks using edquota
  4. I have verified limits for this user updated using "repquota"
  5. I have changed to test user using 'su -' command and created file of 1000 Mb w/o getting any errors/warnings about exceeding quota
  6. I have returned back to root user and checked "repquota" again, and usage numbers were NOT updated for test user
  7. So I have re-run "quotacheck" to get the numbers updated
  8. Then I re-checked "repquota" and block usage have been updated to "1024024" blocks used, however both (hard/soft) limits were back to 0
This definitely doesn't looks like a working solution at all.
So I guess all Plesk user-base on ext4 with recent kernel version might have their quotas limits ignored (perhaps causing lost revenue) w/o even realizing it.
 
Hello!

is there any road-map addressing this?
I create issue to add journaled quotas support with internal id PPP-65306, thanks for the report. Unfortunately I cannot provide any ETA yet.

Unfortunately, it seems that deprecated also means unsupported and ignoring warnings doesn't do any good.
It seems external quotas is not properly enabled - I don't observe such problems on my Ubuntu 22 instance, quotes are enforced:

Code:
~$ dd if=/dev/zero of=file2
dd: writing to 'file2': Disk quota exceeded
169+0 records in
168+0 records out
86016 bytes (86 kB, 84 KiB) copied, 0.00108305 s, 79.4 MB/s
 
Meanwhile, the Plesk 18.0.62 should support "internal" ext4 quotas. Please let me know if you hit some problems with this version.

Still problems here:

Ubuntu 24.04 LTS

#tune2fs -l /dev/vda1 | grep -i features
Filesystem features: has_journal ext_attr resize_inode dir_index fast_commit filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize quota metadata_csum

#cat /etc/fstab
UUID=35676d47-f2e1-4e9a-9829-69227fae0c7e / ext4 discard,errors=remount-ro,noatime,nodiratime,nobarrier,usrquota 0 1
LABEL=UEFI /boot/efi vfat umask=0077 0 1
/swapfile swap swap defaults 0 0
/# /usr/local/psa/admin/sbin/usermng --isquotable
0

 
Still problems here:

Ubuntu 24.04 LTS

#tune2fs -l /dev/vda1 | grep -i features
Filesystem features: has_journal ext_attr resize_inode dir_index fast_commit filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize quota metadata_csum

#cat /etc/fstab
UUID=35676d47-f2e1-4e9a-9829-69227fae0c7e / ext4 discard,errors=remount-ro,noatime,nodiratime,nobarrier,usrquota 0 1
LABEL=UEFI /boot/efi vfat umask=0077 0 1
/swapfile swap swap defaults 0 0
/# /usr/local/psa/admin/sbin/usermng --isquotable
0

Hello!

Could you clarify what is the problem? `usermng --isquotable` returns 0, that means that quota is supported
 
Back
Top