As of the Red Hat Enterprise Linux 6.1 release, GFS2 supports the standard Linux quota facilities. In order to use this you will need to install the quota
RPM. This is the preferred way to administer quotas on GFS2 and should be used for all new deployments of GFS2 using quotas. For information on using the standard Linux quota facilities, see Section 4.5, “GFS2 Quota Management”
A.1. Setting Quotas with the
Two quota settings are available for each user ID (UID) or group ID (GID): a hard limit and a soft limit.
A hard limit is the amount of space that can be used. The file system will not let the user or group use more than that amount of disk space. A hard limit value of zero means that no limit is enforced.
A soft limit is usually a value less than the hard limit. The file system will notify the user or group when the soft limit is reached to warn them of the amount of space they are using. A soft limit value of zero means that no limit is enforced.
You can set limits using the
gfs2_quota command. The command only needs to be run on a single node where GFS2 is mounted.
Setting Quotas, Hard Limit
gfs2_quota limit -u
gfs2_quota limit -g
Setting Quotas, Warn Limit
gfs2_quota warn -u
gfs2_quota warn -g
A user ID to limit or warn. It can be either a user name from the password file or the UID number.
A group ID to limit or warn. It can be either a group name from the group file or the GID number.
Specifies the new value to limit or warn. By default, the value is in units of megabytes. The additional
-b flags change the units to kilobytes, sectors, and file system blocks, respectively.
Specifies the GFS2 file system to which the actions apply.
This example sets the hard limit for user Bert to 1024 megabytes (1 gigabyte) on file system
gfs2_quota limit -u Bert -l 1024 -f /mygfs2
This example sets the soft limit for group ID 21 to 50 kilobytes on file system
gfs2_quota warn -g 21 -l 50 -k -f /mygfs2