Quota: Difference between revisions

From Wiki
Jump to navigation Jump to search
Created page with '{{lowercase title}} == Set up == As root: <pre> apt-get install quota quotatool </pre> update /etc/fstab: <pre> /dev/sdb1 /home ext4 usrquota,usrjquota=quota.user,jqfmt=vfsv0 …'
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{lowercase title}}
{{lowercase title}}
== Set up ==
== Set up ==
As root:
As root:
Line 13: Line 11:
</pre>
</pre>


Then run these commands:
<pre>
<pre>
touch /home/quota.user
touch /home/quota.user
Line 21: Line 20:
</pre>
</pre>


== Manage ==
To see usage and quotas for all users:
<pre>
repquota -a
</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>


== Manage ==
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