Debian Lenny and quota on /home
by Artur on Jan.26, 2010, under All, Sysadmin
There is a small how to here however it describes how to install on / partition. Here are clear instructions for /home.
Login as root, do not use sudo, you will not be able to unmount /home partition if you use sudo.
Install quota
Change mount options
And use following options for /home partition:
errors=remount-ro,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0
Here is example /etc/fstab file:
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/sda1 / ext3 errors=remount-ro 0 1
/dev/sdb1 /home ext3 errors=remount-ro,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 0 2
/dev/sda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
Create user and group file
touch aquota.user aquota.group
Remount /home
mount /home
Run following commands
quotaon -avug
Quota is now enabled on your server
*** Report for user quotas on device /dev/sdb1
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 131212 0 0 2 0 0
artur -- 24 0 0 6 0 0