Implementing Disk Quotas; Configuring Disk Quotas; Enabling Quotas - Red Hat ENTERPRISE LINUX 4 System Administration Manual

Hide thumbs Also See for ENTERPRISE LINUX 4:
Table of Contents

Advertisement

Chapter 13.

Implementing 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 kind of flexibility makes
it possible to give each user a small quota to handle "personal" files (such as email and reports), while
allowing the projects they work on to have more sizable quotas (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.

13.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.

13.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 /
LABEL=/boot
none
none
none
none
/dev/VolGroup00/LogVol02 /home
/dev/VolGroup00/LogVol01 swap
.
.
.
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. Although not ideal, the root (/) partition (the
ext3
defaults
/boot
ext3
defaults
/dev/pts
devpts
gid=5,mode=620
/dev/shm
tmpfs
defaults
/proc
proc
defaults
/sys
sysfs
defaults
ext3
defaults,usrquota,grpquota
swap
defaults
1 1
1 2
0 0
0 0
0 0
0 0
1 2
0 0
117

Advertisement

Table of Contents
loading

Table of Contents