Hello all… I need to set a disk quota for the users in a server managed with virtualmin. I’ve set a disk quota with webmin and this only works for users created with webmin, not when they are created from virtualmin module. I’ve read several posts about that and I’m not sure If I can do that…
New users have their home directory at ‘/home/newuser’.
At ‘/home’ there is a empty file named ‘aquota.user’.
fstab file shows this:
/dev/sda7 /home xfs grpquota,usrquota,rw 0 2
Is it possible to do that? What am I doing wrong?
Thanks for your time…
Hrm, a lot of folks have had trouble getting quotas to work on XFS. I’m honestly not sure it’ll work, but here’s a few thoughts –
By default, a quota should be setup for every user created from within Virtualmin.
Whenever you try creating a user from Virtualmin, what output do you receive? Does it give you an error of some kind regarding quota setup?
Hello again… Thanks for your answer, Eric…
I don’t get any error message nor any output. Simply, virtualmin does not set a disk quota.
If I create the new user from webmin or by command line (useradd) quota disk looks like works fine.
If you look in System Settings -> Virtualmin Config, what is “Set quotas for domain and mail users?” set to?
Thanks again for your time, Eric…
This option (Set quotas for domain and mail users) was setted to ‘No’.
I’ve set it to ‘yes’. Now when I try to create a new virtual server, I get this error:
setquota: Not all specified mountpoints are using quota.
What is the output of the command “mount” on your system?
Thanks again Eric:
This is the output of ‘mount’ command:
/dev/sda1 on / type ext3 (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda5 on /usr type xfs (rw)
/dev/sda6 on /var type xfs (rw)
/dev/sda7 on /home type xfs (rw,grpquota,usrquota)
none on /tmp type tmpfs (rw)
securityfs on /sys/kernel/security type securityfs (rw)
I’m not sure if this is the problem you’re running into or not… but Virtualmin does in many cases attempt to apply quotas to databases, which would be on /var.
I’m curious if you continue to see the problems you’re having now if quotas were enabled on your /var partition.
Thanks again, Eric… I think I have some problem whit that.
After modify ‘/etc/fstab’ file to add usrquota and grpquota on ‘/var’ partition and remount it, when I try to do:
I get this error message:
quotaon: quotactl() on /dev/sda6: Function not implemented
I’ve reinstalled quota and quotatools on my Ubuntu server, but I don’t get to resolve it…
Well, I’m not really familiar with getting quotas working on XFS… so you may need to do some tinkering on your own here if you’d like to use that filesystem
Here’s a couple of thoughts though –
It’s possible you’d have luck by going into Webmin -> System -> Disk Quotas, and enabling them from there.
Second, if that doesn’t help – I see a few hits for the error you’re seeing on Google… they’re a bit on the older side, but here’s an example: