Installation guide
Chapter 9. The XFS File System
52
---------- ---------------------------------
root 0 0 0 00 [------]
testuser 103.4G 0 0 00 [------]
...
To set a soft and hard inode count limit of 500 and 700 respectively for user john (whose home
directory is /home/john), use the following command:
xfs_quota -x -c 'limit isoft=500 ihard=700 /home/john'
By default, the limit sub-command recognizes targets as users. When configuring the limits for a
group, use the -g option (as in the previous example). Similarly, use -p for projects.
Soft and hard block limits can also be configured using bsoft/bhard instead of isoft/ihard. For
example, to set a soft and hard block limit of 1000m and 1200m, respectively, to group accounting
on the /target/path file system, use the following command:
xfs_quota -x -c 'limit -g bsoft=1000m bhard=1200m accounting' /target/path
Note
While real-time blocks (rtbhard/rtbsoft) are described in man xfs_quota as valid units
when setting quotas, the real-time sub-volume is not enabled in this release. As such, the
rtbhard and rtbsoft options are not applicable.
Setting Project Limits
Before configuring limits for project-controlled directories, add them first to /etc/projects. Project
names can be added to/etc/projectid to 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'
Quotas for projects with initialized directories can then be configured, as in:
xfs_quota -x -c 'limit -p bsoft=1000m bhard=1200m projectname'
Generic quota configuration tools (e.g. quota, repquota, edquota) may also be used to manipulate
XFS quotas. However, these tools cannot be used with XFS project quotas.
For more information about setting XFS quotas, refer to man xfs_quota.
9.4. Increasing the Size of an XFS File System
An XFS file system may be grown while mounted using the xfs_growfs command, as in:
xfs_growfs /mount/point -D size
The -D size option grows the file system to the specified size (expressed in file system blocks).
Without the -D size option, xfs_growfs will grow the file system to the maximum size supported by
the device.
Before growing an XFS file system with -D size, ensure that the underlying block device is of an
appropriate size to hold the file system later. Use the appropriate resizing methods for the affected
block device.