8.3. XFS Quota Management
noenforce; this will allow usage reporting without enforcing any limits. Valid quota mount options are:
uqnoenforce- User quotas
gqnoenforce- Group quotas
pqnoenforce- Project quota
xfs_quotatool can be used to set limits and report on disk usage. By default,
xfs_quotais run interactively, and in basic mode. Basic mode sub-commands simply report usage, and are available to all users. Basic
- quota username/userID
- Show usage and limits for the given
- Shows free and used counts for blocks and inodes.
xfs_quotaalso has an expert mode. The sub-commands of this mode allow actual configuration of limits, and are available only to users with elevated privileges. To use expert mode sub-commands interactively, run
xfs_quota -x. Expert mode sub-commands include:
- report /path
- Reports quota information for a specific file system.
- Modify quota limits.
-xfor expert sub-commands.
Example 8.2. Display a sample quota report
/dev/blockdevice), use the command
xfs_quota -x -c 'report -h' /home. This will display output similar to the following:
User quota on /home (/dev/blockdevice) Blocks User ID Used Soft Hard Warn/Grace ---------- --------------------------------- root 0 0 0 00 [------] testuser 103.4G 0 0 00 [------] ...
john(whose home directory is
/home/john), use the following command:
xfs_quota -x -c 'limit isoft=500 ihard=700 /home/john'
limitsub-command recognizes targets as users. When configuring the limits for a group, use the
-goption (as in the previous example). Similarly, use
Example 8.3. Set a soft and hard block limit
/target/pathfile system, use the following command:
xfs_quota -x -c 'limit -g bsoft=1000m bhard=1200m accounting' /target/path
rtbsoft) are described in
man xfs_quotaas valid units when setting quotas, the real-time sub-volume is not enabled in this release. As such, the
rtbsoftoptions are not applicable.
Setting Project Limits
/etc/projects. Project names can be added to
/etc/projectidto map project IDs to project names. Once a project is added to
/etc/projects, initialize its project directory using the following command:
xfs_quota -c 'project -s projectname'
xfs_quota -x -c 'limit -p bsoft=1000m bhard=1200m projectname'
edquotafor example) may also be used to manipulate XFS quotas. However, these tools cannot be used with XFS project quotas.