Quota Howto: Difference between revisions

From Edgar BV Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:


Try http://www.debianhelp.co.uk/Webmin.htm
Try http://www.debianhelp.co.uk/Webmin.htm
In /etc/fstab change the mount line to add usrquota,grpquota options, eg:
/dev/sda1      /                ext3    defaults,errors=remount-ro,usrquota,grpquota  0      1
Then run:
quotacheck -cav
(-c create -a all -v verbose)
''or alternatively''
touch /quota.user /quota.group
chmod 600 /quota.*
mount -o remount /
quotacheck -avugm
quotaon –avug


HINT:  Create a "prototype" user, compile a list of users who will have
HINT:  Create a "prototype" user, compile a list of users who will have
Line 13: Line 37:


is used to report list all the quota's
is used to report list all the quota's
'''Quota's over NFS:'''
1) set up quota's on server fs.
2) make sure rpc.rquotad is running using rpcinfo -p on server (doesn't need to run on the client)
3) mount nfs mount on client as per usual
4) all the tools (repquota, quotacheck, quotaon, etc) only work on the server
5) to edit quota's from the client use '''edquota -r -u user''' or '''edquota -r -g group'''
<pre>
With NFS, quotas are set up on the server's underlying filesystem.  You
then run rpc.rquotad on the server (which the Fedora nfs init script
starts by default).
I just set up quotas on my home NFS server (which is still running F9).
I had to reboot to get them enabled on the filesystem (probably could
have unmounted/remounted and then restarted NFS services, but this box
reboots in under a minute anyway).  I can see them with the quota
command on the NFS client, and they are enforced.
If you want to edit quotas remotely, you have to use the -r option to
edquota.  This also requires adding the -S option to the rpc.rquotad
call (in /etc/sysconfig/nfs on Fedora), but only works in rpc.rquotad
was compiled with that support; the version in F9 and F10 was not, but
F11 includes this support.
None of the other quota commands (such as quotacheck, quotaon, etc.)
work on the NFS client, because those operate directly on the local
filesystem only.
All of this works fine for me between an F9 NFS server and an F11 NFS
client, except for the rpc.rquotad -S option (which should work when I
get the NFS server upgraded).
</pre>
(source: http://www.mail-archive.com/fedora-list@redhat.com/msg50090.html)
----


Cobalt products, manual Quota setting, semi-automatic ;)
Cobalt products, manual Quota setting, semi-automatic ;)

Revision as of 10:54, 4 January 2011

Debian

Try http://www.debianhelp.co.uk/Webmin.htm

In /etc/fstab change the mount line to add usrquota,grpquota options, eg:

/dev/sda1 / ext3 defaults,errors=remount-ro,usrquota,grpquota 0 1


Then run:

quotacheck -cav

(-c create -a all -v verbose)

or alternatively

touch /quota.user /quota.group

chmod 600 /quota.*

mount -o remount /

quotacheck -avugm

quotaon –avug


HINT: Create a "prototype" user, compile a list of users who will have the same quotas as the prototype, and do


edquota -p protouser `cat userlist`


repquota /

is used to report list all the quota's


Quota's over NFS:

1) set up quota's on server fs. 2) make sure rpc.rquotad is running using rpcinfo -p on server (doesn't need to run on the client) 3) mount nfs mount on client as per usual 4) all the tools (repquota, quotacheck, quotaon, etc) only work on the server 5) to edit quota's from the client use edquota -r -u user or edquota -r -g group

With NFS, quotas are set up on the server's underlying filesystem.  You
then run rpc.rquotad on the server (which the Fedora nfs init script
starts by default).

I just set up quotas on my home NFS server (which is still running F9).
I had to reboot to get them enabled on the filesystem (probably could
have unmounted/remounted and then restarted NFS services, but this box
reboots in under a minute anyway).  I can see them with the quota
command on the NFS client, and they are enforced.

If you want to edit quotas remotely, you have to use the -r option to
edquota.  This also requires adding the -S option to the rpc.rquotad
call (in /etc/sysconfig/nfs on Fedora), but only works in rpc.rquotad
was compiled with that support; the version in F9 and F10 was not, but
F11 includes this support.

None of the other quota commands (such as quotacheck, quotaon, etc.)
work on the NFS client, because those operate directly on the local
filesystem only.

All of this works fine for me between an F9 NFS server and an F11 NFS
client, except for the rpc.rquotad -S option (which should work when I
get the NFS server upgraded).

(source: http://www.mail-archive.com/fedora-list@redhat.com/msg50090.html)



Cobalt products, manual Quota setting, semi-automatic ;)

Prerequisites:

=

QuotaTool : http://devel.duluoz.net/quotatool/ Compile this and keep it in your path on the Cobalt product in question.

Getting into postgres:


cat /etc/cobalt/.meta.id <- Copy the alfanumeric output. It's the postgress PW. psql cobalt -u user: <admin> password: <middleclick> (Paste)

Export Quota information for Virtual Hosts:


\o /home/sites/home/users/admin/sites.res select name,quota from vsite;

Export Quota information for users:


\o /home/sites/home/users/admin/users.res select name,quota from users;

Using this information:


cd ~admin cat sites.res | sed -e s#name.*\$##g -e s#--.*\$##g -e s#\(.*\$## -e s#\ ##g > sites.quota cat users.res | sed -e s#name.*\$##g -e s#--.*\$##g -e s#\(.*\$## -e s#\ ##g > users.quota export sites=`cat sites.quota` export users=`cat users.quota` export PATH=.:$PATH for a in $sites ; do

 export group=`echo $a | cut -d\| -f1` ;
 export quota=`echo $a | cut -d\| -f2` ;
 quotatool -g "$group" -bq "$quota"M -l "$quota"M /home

done for a in $users ; do

 export name=`echo $a | cut -d\| -f1` ;
 export quota=`echo $a | cut -d\| -f2` ;
 quotatool -u "$name" -bq "$quota"M -l "$quota"M /home

done