/
/
Error “Numerical result out of range” when creating a quota

Error “Numerical result out of range” when creating a quota

Symptoms

Unable to set a user quota over 4Tbytes. 

The following errors are registered in the panel log  /usr/local/mgr5/var/ispmgr.log:

Error (type: 'sysquota'; object: 'set_size'; value: ''; msg: 'Error using disk quotas. Failed to set the specified disk quota value. The value is too large or not supported by the system' (object: 'set_size')
setquota: Cannot set quota for group 1012 from kernel on /dev/vda2: Numerical result out of range
setquota: Cannot write quota for 1012 on /dev/vda2: Numerical result out of range

PLEASE NOTE!

This issue is typical for outdated OS and file systems. 

Causes

A format different from the 64-bit format vfsv1 is used for the quota. 

Solution

To enable the 64-bit vfsv1 quota format, open the  /etc/fstab file for editing and after the word “defaults” and any other options you have already set, add the following additional mount options:

grpjquota=quota.group,usrjquota=quota.user,jqfmt=vfsv1

Result example:

/dev/vda1 / ext4 defaults grpjquota=quota.group,usrjquota=quota.user,jqfmt=vfsv1 0 2

 

Next, it's necessary to enable disk quotas. For example, execute the following commnds for Debian and Ubuntu:

  • mount -o remount / - to remount a partition;
  • quotacheck -gum / - to create the “quota” utility work files;
  • quotaon -guv / - to enable disk quotas.

If there is an error "Quota format not supported in kernel" observed when enabling quotas, run the command to enable the kernel module for the old quota format:

modprobe quota_v1

Next, repeat commands for enabling disk quotas.

Learn more about enabling disk quotas in our documentation!

In this article