Make sure you have them compiled into your kernel. They’re under filesystem. I’m using v2 but I’ll have both compiled. The module is called quota_v2.

To get the ball rolling, edit the fstab and add ",usrquota,grpquota" to the entry of every filesystem that you want quotas on.

/dev/xvda / ext3 noatime,usrquota,grpquota 0 1

Then you need /aquota.user and /aquota.group files (mode 600). Just touching these didn’t work so good. Eventually I had to use:

sudo quotacheck -ugcfvM /

Then you can use an $EDITOR to set quotas for user cedwards with:

sudo edquota cedwards

Note that the entries under "blocks" and "inodes" are informational and don’t need to be edited.

Or you can do command line quota adjustments with quotatool. I didn’t get it to work, but it must be something like this:

sudo quotatool -t "1 week" -u cedwards -b -l 5000MB -q 4500MB /

Get an idea of how many blocks and inodes there are with:

df -i
df -B `sudo tune2fs -l /dev/xvda | grep "Block size:" | awk '{ print $3 }'`

Once the quotas are happily configured, then they must be activated:

sudo quotaon /

Produce a nice report about all the quota action:

sudo repquota -a

A nice program that emails people if they’re over quota (untested):

sudo warnquota