Quota: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 26: | Line 26: | ||
</pre> | </pre> | ||
To set a soft limit of 30GB and a hard limit of 32GB for barney (units are 1KB blocks): | |||
<pre> | |||
setquota barney 31457280 33554432 0 0 /home | |||
</pre> | |||
To copy barney's limit to charlie and darwin: | |||
<pre> | |||
edquota -p barney charlie darwin | |||
</pre> | |||
To edit a single user's quota: | |||
<pre> | |||
edquota barney | |||
</pre> | |||
To turn quotas off and on: | |||
<pre> | |||
quotaon | |||
quotaoff | |||
</pre> | |||
== References == | == References == |
Latest revision as of 23:50, 7 April 2011
Set up
As root:
apt-get install quota quotatool
update /etc/fstab:
/dev/sdb1 /home ext4 usrquota,usrjquota=quota.user,jqfmt=vfsv0 0 0
Then run these commands:
touch /home/quota.user chmod 600 /home/quota.user mount -o remount /home quotacheck -avum quotaon -avu
Manage
To see usage and quotas for all users:
repquota -a
To set a soft limit of 30GB and a hard limit of 32GB for barney (units are 1KB blocks):
setquota barney 31457280 33554432 0 0 /home
To copy barney's limit to charlie and darwin:
edquota -p barney charlie darwin
To edit a single user's quota:
edquota barney
To turn quotas off and on:
quotaon quotaoff
References
http://www.ubuntugeek.com/how-to-setup-disk-quotas-in-ubuntu.html
notes on journaled quotas: http://ubuntuforums.org/showthread.php?t=1014051&page=2