Installation guide

Assigning Quotas per User
97
15.1.4. Assigning Quotas per User
The last step is assigning the disk quotas with the edquota command.
To configure the quota for a user, as root in a shell prompt, execute the command:
edquota username
Perform this step for each user who needs a quota. For example, if a quota is enabled in /etc/fstab
for the /home partition (/dev/VolGroup00/LogVol02 in the example below) and the command
edquota testuser is executed, the following is shown in the editor configured as the default for the
system:
Disk quotas for user testuser (uid 501):
Filesystem blocks soft hard inodes soft hard
/dev/VolGroup00/LogVol02 440436 0 0 37418 0 0
Note
The text editor defined by the EDITOR environment variable is used by edquota. To change the
editor, set the EDITOR environment variable in your ~/.bash_profile file to the full path of the
editor of your choice.
The first column is the name of the file system that has a quota enabled for it. The second column
shows how many blocks the user is currently using. The next two columns are used to set soft and
hard block limits for the user on the file system. The inodes column shows how many inodes the user
is currently using. The last two columns are used to set the soft and hard inode limits for the user on
the file system.
The hard block limit is the absolute maximum amount of disk space that a user or group can use.
Once this limit is reached, no further disk space can be used.
The soft block limit defines the maximum amount of disk space that can be used. However, unlike the
hard limit, the soft limit can be exceeded for a certain amount of time. That time is known as the grace
period. The grace period can be expressed in seconds, minutes, hours, days, weeks, or months.
If any of the values are set to 0, that limit is not set. In the text editor, change the desired limits. For
example:
Disk quotas for user testuser (uid 501):
Filesystem blocks soft hard inodes soft hard
/dev/VolGroup00/LogVol02 440436 500000 550000 37418 0 0
To verify that the quota for the user has been set, use the command:
quota testuser
15.1.5. Assigning Quotas per Group
Quotas can also be assigned on a per-group basis. For example, to set a group quota for the devel
group (the group must exist prior to setting the group quota), use the command:
edquota -g devel