Disk quotas aren’t working for me. In a nutshell, they aren’t being setup on my /home partition.
Here’s what I’m doing:
I create a ‘freeze dried’ AMI setup with Virtualmin Pro that was upgraded from the Virtualmin GPL AMI.
I then boot an EC2 instance off that and attach an EBS volume at /home with the following fstab entry:
dev/sdf /home ext3 defaults,usrquota,grpquota 1 2
I then enable quotas in Webmin for /home.
After I create a virtual site, I run quota –gv username and get the following:
Disk quotas for group username (gid 501):
Filesystem blocks quota limit grace files quota limit grace
/dev/sda1 28 1048576 1048576 2 0 0
/dev/sdf 75028 0 0 4644 0 0
So I think the quota is being setup on / and not /home. The question then is: How do I get Virtualmin to setup the quota on /home?
Note that I don’t care about quotas on / or that technically the users get a 1GB quota on each partition as I have put the MySQL databases on /home and do a symbolic link from /var/lib/mysql to /home/mysql. Thus I believe that everything I care about is on /home (if this is incorrect then let me know).
/dev/sda1 on / type ext3 (rw,usrquota,grpquota)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
/dev/sda2 on /mnt type ext3 (rw)
/dev/sdf on /home type ext3 (rw,usrquota,grpquota)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
Both user and group quotas are enabled for home and email directories.
The only complain is this:
Default IP address is set to 10.249.206.165, but the detected external addresss is actually 174.129.235.251. This is typically the result of being behind a NAT firewall, and should be corrected on the module configuration page.
*** Report for user quotas on device /dev/sdf
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
Looks like the quota is being set on the / filesystem instead of /home.
Was this “ws” domain created after you did you “Re-check Config” ? If not, you should create another test domain and see if its quotas get set in the right place.
‘ws’ was created before running ‘Re-Check Config’.
After running ‘Re-Check Config’, and creating a new site with a 1GB limit for a user named ‘biz’, I get the following after running quota -gv biz:
Disk quotas for group biz (gid 502):
Filesystem blocks quota limit grace files quota limit grace
/dev/sda1 28 0 0 2 0 0
/dev/sdf 75524 1048576 1048576 4820 0 0
Which looks correct. Running repquota -v /home I get:
*** Report for user quotas on device /dev/sdf
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace