Chapter 7. Implementing Disk Quotas
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.
7.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:
• Issue the umount command followed by the mount command to remount the file system.(See the
man page for both umount and mount for the specific syntax for mounting and unmounting various
filesystem types.)
• Issue the mount -o remount <file-system> command (where <file-system> is the name
of the file system) to remount the file system. For example, to remount the /home file system, the
command to issue is mount -o remount /home.
If the file system is currently in use, the easiest method for remounting the file system is to reboot the
system.
7.1.3. Creating the Quota Database Files
After each quota-enabled file system is remounted, the system is capable of working with disk
quotas. However, the file system itself is not yet ready to support quotas. The next step is to run the
quotacheck command.
The quotacheck command examines quota-enabled file systems and builds a table of the current
disk usage per file system. The table is then used to update the operating system's copy of disk
usage. In addition, the file system's disk quota files are updated.
To create the quota files (aquota.user and aquota.group) on the file system, use the -c option
of the quotacheck command. For example, if user and group quotas are enabled for the /home file
system, create the files in the /home directory:
quotacheck -cug /home
The -c option specifies that the quota files should be created for each file system with quotas
enabled, the -u option specifies to check for user quotas, and the -g option specifies to check for
group quotas.
If neither the -u or -g options are specified, only the user quota file is created. If only -g is specified,
only the group quota file is created.
After the files are created, run the following command to generate the table of current disk usage per
file system with quotas enabled:
quotacheck -avug
The options used are as follows:
80
Need help?
Do you have a question about the ENTERPRISE LINUX 5 - DEPLOYMENT and is the answer not in the manual?
Questions and answers