I've run into the problem that my 5TB disk has a large proportion of content from one group of users, which is okay. I'd like to limit the total disk usage of that group to ~4.5TB, but I'm unable to, I get the following error:

setquota: Cannot set quota for group 100 from kernel on /dev/md1: Numerical result out of range

Google has not been very useful so far in trying to solve this question. Can anyone help or give direction?


Okay, I've managed to get it figured out, so I'm going to answer my own question to the best of my knowledge.

The original error was caused by the fact that the quota format vfsv0 is unable to support quotas >= 4TiB. Quota has a (relatively) new format to support quotas >4TiB, called vfsv1. You need at least kernel 2.6.33 for kernel support for vfsv1.

You need(?) to use journaled quotas, which will work on ext4 and ext3(?).

In /etc/fstab you will need to add the following for quota support for your mount:


an example fstab line would be (here, the mountpoint is /):

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

Don't create the files quota.user or quota.group in your mountpoint. Afterwards do:

mount -o remount /

then do

quotacheck -avugm

which will create quota.user and quota.group, followed by:

quotaon -avug

At this point, you may get an error along the lines of quotaon: Quota format not supported in kernel.

This is because the kernel wasn't compiled with support for vfsv1, but not to worry, try

modprobe quota_v1

modprobe quota_v2

quotaon -avug

if that worked, then be sure to add quota_v1 and quota_v2 to /etc/modules

If everything worked, then you should be able to change the quota to something over 4TiB!

  • Just adding a note: if you use webmin, you can follow these instructions manually and then the webmin interface appears to work for size > 4 TiB. – Dave May 3 '15 at 19:41

In the man of setquota, I see :

-F, --format=quotaformat Perform setting for specified format (ie. don't perform format autodetection). Possible format names are: vfsold Original quota format with 16-bit UIDs / GIDs, vfsv0 Quota format with 32-bit UIDs / GIDs, 64-bit space usage, 32-bit inode usage and limits, vfsv1 Quota format with 64-bit quota limits and usage, rpc (quota over NFS), xfs (quota on XFS filesystem)

This is maybe what you want... I didn't try.

  • I'm using ext4, for which support for vfsv1 is only available from 2.6.33, so I've upgraded my kernel to later than 2.6.33. In setquota I now have the same text as you for the -F option. I saw somewhere else that one ought to use convertquota to upgrade from vfsv0 to vfsv1, but my version of convertquota seems outdated and doesn't mention (or support) vfsv1. I also tried setquota with -F vfsv1, but that threw the same error as before. I'm a bit at a loss as to what to do. – JamesGuthrie Jan 9 '12 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.