Categories: CategoryLinux


install packages quota and quotatool.

ext2 supports quota. For reiserfs you need a patch available at ftp://ftp.suse.com/pub/people/mason/patches/reiserfs/quota-2.4/

see: * http://ftp.gwdg.de/LDP/HOWTO/mini/Quota.html * http://www.asenec.com/quota.html

Configuration

/dev/hda2       /home    ext2    defaults,usrquota,grpquota       0   0

Run quotacheck to create a quota file for quota version 1.

$ quotacheck -cvug -F vfsold /home 

There should be no write-access on the filesystem /home.

Start quota

$ /etc/init.d/quota start

Use quotatool to change quota for a single user:

$ quotatool -u joe -b -l 768MB /home    # hard limit
$ quotatool -u joe -b -q 512MB /home    # soft limit
$ quotatool -u -b -t "1 weeks" /home       # grace for all users

User can check his/her quota with:

$ quota -q

Run regulary (once per week) quotacheck

$ quotacheck -avugm

Run warnquota daily by cron. It checks quotas and sends email to users who exceed quota. The cron.daily job is added by debian automatically.

Quota with NFS

You just need the user program quota on the client.

Quota with Samba