Disk Quota Problem w/Multiple Partitions

15 posts / 0 new
Last post
#1 Sun, 12/20/2009 - 23:46
dtwyman

Disk Quota Problem w/Multiple Partitions

Hi,

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:

1) I create a ‘freeze dried’ AMI setup with Virtualmin Pro that was upgraded from the Virtualmin GPL AMI. 2) 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

3) 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).

Thanks

Mon, 12/21/2009 - 08:35
andreychek

Howdy,

You should be able to enable quotas on that filesystem by going into Webmin -> System -> Disk Quotas, and click "Enable disk quotas".

If that doesn't fix your issue, post a followup and we'll dig into what's going awry there :-)

-Eric

Mon, 12/21/2009 - 11:43
dtwyman

Hi,

Yeah – that’s what I did and when it didn’t work I thought I might be missing something.

Do you need anything from me? I do have all me setup steps written down.

Dan

Mon, 12/21/2009 - 12:10
andreychek

Hrm, can you post the full contents of your /etc/fstab file, as well as the output to the command "mount"?

Thanks!

-Eric

Mon, 12/21/2009 - 12:18
dtwyman

fstab:

/dev/sda1 /     ext3    usrquota,grpquota 1 1
# Legacy /etc/fstab
# Supplied by: ec2-ami-tools-1.3-20041
/dev/sda2 /mnt  ext3    defaults 0 0
/dev/sda3 swap  swap    defaults 0 0
none      /proc proc    defaults 0 0
none      /sys  sysfs   defaults 0 0
/dev/sdf /home ext3 defaults,usrquota,grpquota 1 2

mount:

/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)
Wed, 12/30/2009 - 08:50
dtwyman

Attention tech support:

I'm wondering if I can get some help on this issue. If you can't fix it then could you at least give me a workaround?

Wed, 12/30/2009 - 12:20 (Reply to #6)
JamieCameron

If you go to System Settings -> Re-Check Config, what does it say in the output in the line about quotas?

''

Wed, 12/30/2009 - 12:25
dtwyman

It says (with respect to quotas):

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.

But I don't think that is an issue.

Wed, 12/30/2009 - 12:56 (Reply to #8)
JamieCameron

Ok, that looks good.

So if you create a new domain with a 100M quota and then list quotas on /home with a command like :

repquota -v /home

does it list the new domain's user?

''

Wed, 12/30/2009 - 15:33
dtwyman

Here are the results (the quota is 1GB):

*** 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

root -- 205296 0 0 122 0 0
mysql -- 15504 0 0 117 0 0
ws -- 74420 0 0 4585 0 0

Statistics: Total blocks: 7 Data blocks: 1 Entries: 3 Used average: 3.000000

Wed, 12/30/2009 - 15:45 (Reply to #10)
JamieCameron

Was "ws" the user for the new domain you created?

If not, what happens if you manually edit the quota for the new user, with a command like :

edquota username

''

Wed, 12/30/2009 - 16:05
dtwyman

Yes - 'ws' is the user/group name.

Running edquota, I get:

Disk quotas for user ws (uid 500): Filesystem blocks soft hard inodes soft hard /dev/sda1 28 0 0 2 0 0 /dev/sdf 74424 0 0 4585 0 0

Which is funny because running quota -gv ws, I get:

Disk quotas for group ws (gid 501): Filesystem blocks quota limit grace files quota limit grace /dev/sda1 28 1048576 1048576 2 0 0
/dev/sdf 75032 0 0 4644 0 0

Which seems to me to show a quota on /dev/sda1 whereas edquota does not.

Wed, 12/30/2009 - 17:46 (Reply to #12)
JamieCameron

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.

''

Thu, 12/31/2009 - 03:31
dtwyman

'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

root -- 205328 0 0 128 0 0
mysql -- 20548 0 0 362 0 0
ws -- 74500 0 0 4594 0 0
biz -- 73644 0 0 4575 0 0

Thu, 12/31/2009 - 13:29 (Reply to #14)
JamieCameron

Ok, great! That is expected, as if you change the home filesystem Virtualmin won't detect this until you do a configuration re-check.

''

Topic locked