Click to See Complete Forum and Search --> : Group Quotas


M Hughes
04-10-2001, 09:27 AM
I am trying to setup Group Quotas on a Red Hat 6.2 Server here at work and running into a few troubles. Here's all the steps I took prior to running into my problems:

1 - Verified that the Kernel was configured for Quotas
2 - Place a quota script in the /etc/rc.d/init.d directory and made a symbolic link to it in the rc3.d directory (S87quota - late enough so that it will start after the other stuff loads)
3 - Modified /etc/fstab so that the partition I want has grpquota and usrquota enabled
4 - Created the quota records by 'touch /quota.user' & 'touch /quota.group'. I then 'chmod 600 quota.user' & 'chmod 600 quota.group'
5 - Instead of rebooting, I ran '/bin/mount -a' to reload the fstab file.


All of that has worked correctly. I then moved on to creating a new group called 'asymonte-com' for a web domain we are trying to limit to 50MB of space. I created the group with 'groupadd asymonte-com' and then added the primary username with 'usermod -Gasymonte-com asymonte'. In checking the /etc/group file, 'asymonte-com' exists with 'asymonte' as a member of it. I then begin to assign the quotas.

I ran /usr/sbin/edquota -g asymonte-com and made the first line look like this : /dev/sda6: blocks in use: 0, limits (soft = 51200, hard = 51200). I did nothing to the second line since we are not using Soft or Hard limits. Before doing anything else, I ran /sbin/quotacheck -avug and it checked the entire drive. That took about fifteen minutes which isn't bad for a 17GB hard drive. I finally ran /usr/sbin/repquota -a to generate a report. The report that came back showed:

Block limits File limits
User used soft hard grace used soft hard grace
asymonte-c-- 4 0 0 1 0 0
asymonte -- 10728 0 0 73 0 0

Running 'quota -g asymonte-com' shows:
Disk quotas for group asymonte-com (gid 1479): none

Am I doing something wrong here? The steps I followed were from the LDP HOWTO on quotas. If I setup User quotas, it shows up right but we really need the Group quotas to work. Any help would be really really appreciated. Thanks.

M Hughes
mhughes@inav.net

bdg1983
04-10-2001, 05:18 PM
I do wish I could help you on this. The precise details in your explaination certainly does warrant an answer.

Searching at www.google.com/linux (http://www.google.com/linux) may find something.

I do know that Webmin ( www.webmin.com/webmin (http://www.webmin.com/webmin) ) has a quota module for configuring quotas. It's a browser based configuration utility. May help.

Any documentation included with your distro that may help? 'man quota' ?

M Hughes
04-11-2001, 09:12 AM
I checked out all of the man files and printed off everything I could find about quotas on the LDP (most of what I found in a Google search led to duplicates of those docs). It looks like I am doing things according to the instructions.

We do have a server here that has User Quotas setup (this was done long ago) so I checked that. The only difference I can see between the two systems is in the /etc/fstab. On the server I am trying to setup quotas on, the /etc/fstab looks like this :

/dev/sda6 / ext2 defaults,usrquota,grpquota 1 1

On our server which currently has Quotas working on it for Users, the /etc/fstab looks like this:

/dev/sdb1 /home ext2 defaults,grpquota,usrquota 1 3

Note, I've double checked the partitions and they are correct. One server just happens to have a seperate drive for the /home directory while the other has one drive for everything. Does that give anyone more clues?

Thanks for the link to WebMin by the way. I'll check that out and see if it helps me.

Infested Flar
04-11-2001, 09:52 AM
there's an NHF on that one (i wrote it :p) Using Quota NHF (http://linuxnewbie.org/nhf/intel/tools/edquota.html).

if ur administering quota on /home, (assuming that its on root partition,or a mounted partition, /),then u should reboot. 'mount -a' works only on not mounted partitions.

-flar-

M Hughes
04-11-2001, 11:06 AM
Thanks Flar. I knew there had to be something here but I couldn't find it. I followed your steps to the letter and rebooted the server. Alas, I still don't have anything.

I did find something odd. I have a group called 'bluestem' which existed prior to me attempting all of this Quota stuff. On a lark, I ran a 'edquota -g bluestem' and assigned them a limit of 51200, soft and hard. I then created a group called asymontecom ('groupadd asymontecom asymonte') and assigned a user to that group (usermod -Gasymontecom). I edited asymontecom's quota to be 51200 just like bluestem.

When I ran 'quota -g bluestem', I recieved:
Disk quotas for group bluestem (gid 1272):
Filesystem blocks quota limit grace files quota limit grace
/dev/sda6 4232 51200 51200 214 0 0

When I run the same command for asymontecom, I get:
Disk quotas for group asymontecom (gid 1479): none

A 'repquota -g -a' does not even have asymontecom on it but shows bluestem as:
bluestem -- 4232 51200 51200 214 0 0

Perhaps my problem is not the quotas but in creating Groups? All the individual users I setup work correctly. Thanks for all the help in advance :D

[ 11 April 2001: Message edited by: M Hughes ]

M Hughes
04-11-2001, 03:37 PM
I'm happy to say that between a few coworkers here at my company and this board, I have figured out the problem that was vexing me concerning Group Quotas. It was a simple matter of changing the group ownership of the files to the group that had the quota. In this case, the user 'asymonte' belonged to the group 'asymonte-com'. All of the files, however, were owned by the group 'users'. Once I ran 'chgrp -R asymonte-com *' and then 'quota -g asymonte-com', it worked! Really simple and I don't know how it slipped past us.

Thanks for all of your help!