Quota Howto
Ext4
apt-get install quotatool
In /etc/fstab add the following options to the mount line:
usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0
The 'j' tells it you're making a journaling quota
mount -o remount / (or whatever filesystem you've added quota support to)
run quotacheck -cvagum
Ext3
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 -vagum
quotaon –vagu
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
NFS
Quota's over NFS:
- set up quota's on server fs.
- make sure rpc.rquotad is running using rpcinfo -p on server (doesn't need to run on the client)
- on server make sure /etc/default/quota has -S as: RPCRQUOTADOPTS="-p 32769 -S"
- mount nfs mount on client as per usual
- all the tools (repquota, quotacheck, quotaon, etc) only work on the server
- 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