3.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 subcommands 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 subcommands of this mode allow actual configuration of limits, and are available only to users with elevated privileges. To use expert mode subcommands interactively, run
xfs_quota -x. Expert mode subcommands include:
- report /path
- Reports quota information for a specific file system.
- Modify quota limits.
-xfor expert sub-commands.
Example 3.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 john' /home/
limitsub-command recognizes targets as users. When configuring the limits for a group, use the
-goption (as in the previous example). Similarly, use
Example 3.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
bhardcount by the byte.
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 -x -c 'project -s projectname' project_path
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.
xfs_quotaover all other available tools.
man projid(5), and