linux quotas

when the sun tech installed the hard drive array he made one big 4TB partition. when i finally made my mind up about which size quota to give each user i realized that i needed to have a separate partition for the quotas. i used lvm to resize the partition and created an additional partition for the mail server to use. in /etc/fstab there needed to be an option to enable usrquota. after any changes are made to fstab the partitions need to be remounted. once this is done the quota files need to be generated. use the command “time /sbin/quotacheck -vguma” after the quota files have been set up, the quotas need to be set for all users

[root@babbage space1]# time /sbin/quotacheck -vguma quotacheck: Scanning /dev/mapper/volgroup1-homedirs [/space1] quotacheck: Cannot stat old user quota file: No such file or directory quotacheck: Old group file not found. Usage will not be substracted. done quotacheck: Checked 12 directories and 226 files quotacheck: Old file not found. quotacheck: Scanning /dev/mapper/volgroup1-www [/www] quotacheck: Cannot stat old user quota file: No such file or directory quotacheck: Old group file not found. Usage will not be substracted. done quotacheck: Checked 4 directories and 3 files quotacheck: Old file not found. real 20m30.645s user 0m38.665s sys 4m38.296s

now that the system is set up for quota’s first select a user and manually set up quotas for them.

edquota pauls

the next step is applying this quota to all the other users

i wrote a python script to run the command edquota -p pauls username for every new user added to the system. later in a newuser script i will have this called for each user.

after you have modified all the quotas you need to run the above quotacheck command again. it is a good idea to set your system to automatically run quotacheck when needed.

hopefully this will not burden the users and at the same time keep them from taxing the system.

 

Next entry

Similar entries