Setting Project Quota Limits

Use the xfs_quota command to configure the project quota on a directory tree and then to set soft and hard limits on blocks and inodes.

The instructions that follow here assume that you have already mounted the file system using the pquota option and have created a project ID in /etc/projects. See Setting Up Project Quotas.

To perform this task, you use the specify the xfs_quota with the -x option to enter expert mode. You can then run quota configuration tasks as required.

For more information, see the projects(5), projid(5), and xfs_quota(8) manual pages.

  1. Initialize a project for a managed tree at a specified mountpoint.

    Use the project subcommand of xfs_quota to define a managed tree in the XFS file system for the project.

    sudo xfs_quota -x -c ’project -s project_namemountpoint

    For example, you would define a managed tree in the /mnt file system for the project testproj, which corresponds to the directory hierarchy /mnt/testdir, as follows:

    sudo xfs_quota -x -c ’project -s testproj’ /mnt
  2. Use the limit subcommand with the -p option to set limits on the disk usage of the project.
    sudo xfs_quota -x -c ’limit -p arguments project_namemountpoint

    For example, to set a hard limit of 10 GB of disk space for the project testproj, you would use the following command:

    sudo xfs_quota -x -c ’limit -p bhard=10g testproj’ /mnt