Skip to content

Enabling disk quota

The panel allows a per-package disk limit (DiskQuotaMB). For that limit to actually be enforced, the operating system must have Linux filesystem quotas enabled on the root filesystem (/). For safety, enconf does not enable this automatically — changing fstab and remounting/rebooting the live root filesystem is a deliberate admin step.

Honesty over security theatre

While quota is not active, a configured DiskQuotaMB is stored but not enforced. The Security Advisor shows the real status under the "Disk quota" check (green = active, yellow = not active).


Check the status

$ sudo repquota -u /

If it prints "no quota enabled", quota is not active. The Security Advisor (Admin → Security Advisor) shows the same status.


Enable (ext4)

  1. Edit fstab — add usrquota to the root entry's mount options:

    /dev/sda1  /  ext4  errors=remount-ro,usrquota  0  1
    
  2. Remount (or reboot):

    $ sudo mount -o remount /
    
  3. Build the quota database and turn it on:

    $ sudo quotacheck -cum /
    $ sudo quotaon -v /
    

Afterwards repquota -u / shows a table instead of the error, and the advisor check turns green. Per-package DiskQuotaMB values apply from the next provisioning operation; for existing users they are re-applied on the next package save.


Enable (XFS)

On XFS, quotas are controlled via the uquota mount option and activate at mount time — no quotacheck needed:

/dev/sda1  /  xfs  defaults,uquota  0  0

An XFS root can only pick up quota options at boot, so a reboot is required here.


Notes

  • Only the root filesystem mount matters, since customer directories live under /var/www/customers/.
  • Cloud images without a separate / device work the same way — what counts is the mount option on /.
  • Container hosts without their own root filesystem (LXC/OpenVZ) don't support classic quotas; there the cgroup-based limits (RAM/CPU/IO) still apply, only disk quota does not.