User Tools

Site Tools


quota

Quota

Quota for Disk Space Usage

To prevent users from filling up the hard disk - quotas are needed. It can be done on a user or group level. The group level will be chosen, although only specific users will have quotas. Here is how:

1. Edit /etc/fstab, and change<br> /dev/sda1 / ext3 defaults,errors=remount-ro 0 1<br> /dev/sda1 / ext3 defaults,errors=remount-ro,usrquota,grpquota 0 1<br>

2. Add quota support module<br> modprobe quota_v2 //may give a licence warning. Warnings are logged to /var/log/dmesg echo 'quota_v2' » /etc/modules

3. Put the quota scripts in a suitable place: touch /home/aquota.user touch /home/aquota.group chmod 600 /home/aquota.user /home/aquota.group

4. Now install quota via apt: apt-get install quota quotatool

5. REBOOT //Quota should be working afterwards. Type quota - to see a users quota

6. To set the soft limits to 200Mb and the hard limit to 250Mb for a user called testuser you would run: quotatool -u testuser -bq 200M -l '250 Mb' /dev/sda1

The user will be emailed daily if they have exceeded their soft limit. The cronjob for this is in /etc/cron.daily

Root can see who is using what by running: repquota /dev/sda1


As ever - excellent help from debian administration at:<br> http://www.debian-administration.org/articles/47

http://www.debianhelp.co.uk/Webmin.htm

quota.txt · Last modified: 2022/07/19 21:13 by 127.0.0.1