System information

Chapter 16. 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 quo ta RPM must be installed to implement disk quotas.
16.1. Configuring Disk Quot as
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.
16.1.1. Enabling Quot as
As root, using a text editor, edit the /etc/fstab file.
Examp le 16 .1. Ed it /etc/fstab
For example, to use the text editor vi m type the following:
# vim /etc/fstab
Add the usrq uo ta and/or g rpq uo ta options to the file systems that require quotas:
Examp le 16 .2. Ad d q u o t as
/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
Chapt er 1 6 . Disk Q uot as
119