SysAdmin‎ > ‎

Quota

Setting up Disk Quota

For more info you can look at the websites I used or Google disk quota to see what you find

https://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-disk-quotas.html

http://www.yolinux.com/TUTORIALS/LinuxTutorialQuotas.html

http://www.thegeekstuff.com/2010/07/disk-quota/

You will need to be able to log into Maratea

If you don't have an account on Maratea ask Professor Gallicchio to make one for you

Login to Maratea using your account by typing in

ssh user@maratea

You can substitute maratea for an IP if the name maratea is linked to the wrong IP

You will need to change users to root by typing in

su

You will need the password for Maratea, ask Professor Gallicchio if you do not have it

As root, check /etc/fstab to see whether or not disk quota is already set up by typing

cat /etc/fstab


Quota set up

If it is, it will show usrquota, grpquota in the row with /home

Skip to the step after No Quota set up


No Quota set up

If no quota was set up, edit the fstab file and append usrquota and grpquota to where it says defaults, so it should say

ext4 defaults,usrquota,grpquota

You will need to remount the drive by either restarting or typing in

mount -o remount /home

Create the quota database file with

quotacheck -cug /home

Generate the table of current disk usage with

quotacheck -avug


Assign quotas by typing in

edquota username

Assign block limits the soft and hard, ask Professor how much space he wants the limits to be

What I currently have set up is 100GB hard limit and 90% of hard limit as soft limit so 90GB

To enable quota if not already enabled, use

quotaon -vug /home

To disable quota, use

quotaoff -vug /home

To check a users quota or to see if they have a quota set up, use

quota user

To get a disk usage report, use

repquota /home

There will be a -- for each user, if there is a + instead, it means they went over one of the limits

Comments