4

I want to install Dovecot on Ubuntu 12.04 LTS, and it recommends that we place the control files into a partition which will not be limited by the filesystem quota.

If I create an ext4 partition with 2 gigs, how do I remove the quota on that partition? I know the partitions are defined in /etc/fstab, and I think usrquota and grpquota have to be explicitly set to disabled.

But I am unsure what the entire line should look like.

Is it something like:

/dev/hda2       /       ext4    defaults,usrquota,grpquota        1       0        0

On the other hand, I found something called quotaon and quotaoff. Would this be used instead of fstab? Is there a difference?

tabx
  • 43
  • 1
  • 6

2 Answers2

6

Your mount points are defined in /etc/fstab and those options will be used by default every time you boot.

So if you use the line:

 /dev/hda2       /       ext4    defaults,usrquota,grpquota        1       0        0

quotas will be enabled when you boot.

The commands quotaon and quotaoff will enable / disable quotas from the command line.

See: http://manpages.ubuntu.com/manpages/dapper/man8/quotaon.8.html for additional options.

So if you wish to disable quotas by default, use noquota in fstab

/dev/hda2       /       ext4    defaults,noquota        1       0        0
Panther
  • 100,877
  • 19
  • 193
  • 283
  • Could you clarify something for me. The fourth column in /etc/fstab represents mount options. There are two different types: FILESYSTEM INDEPENDENT/DEPENDENT SPECIFIC MOUNT OPTIONS. `quotaoff` is not an option in either of those. But I do see `grpquota|noquota|quota|usrquota ` in the DEPENDENT option, however it also says this: `These options are accepted but ignored. ` – tabx Mar 01 '13 at 19:50
  • I found the description of mount options here: http://linux.die.net/man/8/mount – tabx Mar 01 '13 at 19:51
  • Read the entire line, lol - "These options are accepted but ignored. (`However, quota utilities may react to such strings in /etc/fstab`.) " So mount will ignore these strings, but quota uses them. – Panther Mar 01 '13 at 19:54
  • Whoops, why did I miss that. Thank you, I think I understand it. – tabx Mar 01 '13 at 19:55
  • I guess as a curiosity question: does using quotaon/quotaoff just modify /etc/fstab to use `noquota`? What would be the benefit of using this command rather than manually specifying it in /etc/fstab? – tabx Mar 01 '13 at 19:58
  • That I know, the commands do not affect fstab. I would imagine you use those commands to enable or disable quotas "on the fly". So the defautl behavior of quota is set in fstab, and modified on the command line. – Panther Mar 01 '13 at 20:01
2

Quotas are off by default, and must be explicitly enabled by building quota files with quotacheck, and placing the quota flags in /etc/fstab for quotaon -a to recognize and activate the quotas during boot.

So unless you did all that, you don't have to do a thing.

If you did, then you can turn them off with quotaoff and removing the flags from /etc/fstab to prevent them from being turned back on at the next boot.

psusi
  • 37,033
  • 2
  • 68
  • 106