How to setup Disk Quotas in Ubuntu

Sponsored Link
QUOTA is implemented using the BSD system call interface as the means of communication with the user level. This is based on the Melbourne quota system which uses both user and group quota files.

Quotatool is a utility to set filesystem quotas from the commandline. Most quota-utilities are interactive, requiring manual intervention from the user. Quotatool on the other hand is not, making it suitable for use in scripts and other non-interactive situations. This is very useful to edit disk quotas from scripts.

Install quota tools using the following command

sudo apt-get install quota quotatool

Edit /etc/fstab and add usrquota and grpquota options to the mount point which contains the home directories. For me this was the root mount point, but it will depends on how you did your partitoning (it could be that you made a separate mount point for /home).

sudo gedit /etc/fstab

The entry should read something like:

# /dev/hda1 UUID=4ea80ca3-37b7-447e-831a-700a38627029 / ext3 defaults,errors=remount-ro,usrquota,grpquota 0 1

Finish setup with the following series of commands

sudo touch /quota.user /

sudo chmod 600 /quota.*

sudo mount -o remount /

sudo quotacheck -avugm

sudo quotaon -avug

That's it

You can also use webmin to configure this through GUI.

Sponsored Link

You may also like...

8 Responses

  1. LMB says:

    My present disk is 25000 larger than my first disk (1991), so for regular users there’s no point to implement this.

  2. trogdor says:

    when i try to configure quota i get this screen but im not sure where to add the quota tabs please help

    /dev/md1 / ext3 errors=remount-ro 0 1
    /dev/md2 /home ext3 defaults 1 2
    /dev/sda3 swap swap defaults 0 0
    /dev/sdb3 swap swap defaults 0 0
    proc /proc proc defaults 0 0
    sysfs /sys sysfs defaults 0 0

  3. kthxbai2u says:

    That is what I have. You are using Ubuntu 8.10, correct?

    The FStab is different…

    I will eventually need quotas working, so if anyone finds it out let me know. I will post back if I find it.

    Funny, I never ran into this problem before…

  4. no help says:

    this is not helpful at all. need to tell how exactly to edit /etc/fstab . permission denied

  5. chamnan says:

    i want to about DNS on ubuntu?

  6. LMB says:

    no help: this is how you do it

    sudo gedit etc/fstab &

    have fun

  7. red says:

    I think the quota should be configured in /home partition “if you have it alone”, if not just use the root partition (/).
    Another thing, the partition should not be mounted, so you should be on runlevel 1 (single mode) in order to be able configure quotas on a particuler partition.

  8. Joshua Lonsdale says:

    –Use the line I used below…

    sudo gedit /etc/fstab

    should bring up a note pad with some text.

    then add to each quotaized partition


    then remount each quota partition with

    sudo mount -o remount [system to reboot]

    where you would use /, or /home, or in my case /fs-server.

    he spells it out pretty well.

Leave a Reply

Your email address will not be published. Required fields are marked *