Installation guide
Chapter 15.
95
Disk Quotas
Disk space can be restricted by implementing disk quotas which alert a system administrator before a
user consumes too much disk space or a partition becomes full.
Disk quotas can be configured for individual users as well as user groups. This makes it possible to
manage the space allocated for user-specific files (such as email) separately from the space allocated
to the projects a user works on (assuming the projects are given their own groups).
In addition, quotas can be set not just to control the number of disk blocks consumed but to control the
number of inodes (data structures that contain information about files in UNIX file systems). Because
inodes are used to contain file-related information, this allows control over the number of files that can
be created.
The quota RPM must be installed to implement disk quotas.
15.1. Configuring Disk Quotas
To implement disk quotas, use the following steps:
1. Enable quotas per file system by modifying the /etc/fstab file.
2. Remount the file system(s).
3. Create the quota database files and generate the disk usage table.
4. Assign quota policies.
Each of these steps is discussed in detail in the following sections.
15.1.1. Enabling Quotas
As root, using a text editor, edit the /etc/fstab file. Add the usrquota and/or grpquota options to
the file systems that require quotas:
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol02 /home ext3 defaults,usrquota,grpquota 1 2
/dev/VolGroup00/LogVol01 swap swap defaults 0 0 . . .
In this example, the /home file system has both user and group quotas enabled.
Note
The following examples assume that a separate /home partition was created during the
installation of Red Hat Enterprise Linux. The root (/) partition can be used for setting quota
policies in the /etc/fstab file.
15.1.2. Remounting the File Systems
After adding the usrquota and/or grpquota options, remount each file system whose fstab entry
has been modified. If the file system is not in use by any process, use one of the following methods: