HowtoForge

How To Set Up Journaled Quota On Debian Lenny

How To Set Up Journaled Quota On Debian Lenny

Version 1.0
Author: Falko Timme

This tutorial shows how you can set up journaled quota on a Debian Lenny system. With journaled quota, you don't need to run quotacheck after an unclean shutdown. Journaled quota works on ext3 and ext4 file systems.

I do not issue any guarantee that this will work for you!

 

1 Preliminary Note

If you set up quota the "normal" way (e.g. as shown in chapter nine on The Perfect Server - Debian Lenny (Debian 5.0) [ISPConfig 2] - Page 3), you might see the following warning:

quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown. 

This is how you set up journaled quota:

 

2 Journaled Quota

To install quota, run

aptitude install quota

Edit /etc/fstab. Add usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 to the partition where you want to use quota. Mine looks like this (I want to use quota on the / partition):

vi /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/sda1       /               ext3    errors=remount-ro,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 0       1
/dev/sda5       none            swap    sw              0       0
/dev/hda        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0

To enable quota, run these commands:

touch /aquota.user /aquota.group
chmod 600 /aquota.*
mount -o remount /

quotacheck -avugm
quotaon -avug

That's it - journaled quota is now enabled.

 

How To Set Up Journaled Quota On Debian Lenny