20.1. Qouta

Quota is a system administration tools for monitoring and limiting users and/or groups disk usage, per file system. Two features of disk storage with quota are available to set limits:

With quota, the users are forced by the system administrator to not consume unlimited disk space on a system. This program is handled on per user, per file system basis and must be set for each file system separately.

The first thing you need to do is ensure that your kernel has been built with Quota support enabled. In the 2.2.14 kernel version you need ensure that you have answered Y to the following questions:

                Filesystems
                Quota support (CONFIG_QUOTA) [N/y/?] Y
              

Tip: If you have followed the Linux Kernel chapter in this book and have recompiled your kernel, the option Quota support shown above is already set.

20.1.1. Modify the /etc/fstab file

The /etc/fstab file contains information about the various file systems installed on your Linux server. Quota must be enabled in the fstab file before you can use it. Since Quota must be set for each file system separately, and because in the fstab file, each file system is described on a separate line, quota must be set on each of the separate lines in the fstab for which you want to enable quota support.

With the program quota, depending on your intentions, needs, etc, you can enable quota only for users, groups or both users and groups. For all examples below, we'll use the /home directory on the /dev/sda6 partition and shows you the three possibilities.