Displaying Block Usage Quota Information

Use the xfs_quota command to display quota reports and to see file system usage.

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

  • Use the report subcommand to see an overview of usage and limits for all users, groups, and projects.

    For example, to display the block usage limits and the current usage for all user quotas in the file system mounted at /mnt, use the report -ubh subcommand:

    xfs_quota -x -c 'report -ubh' /mnt

    Output similar to the following is displayed:

    User quota on /mnt (/dev/sdc1)
                            Blocks              
    User ID      Used   Soft   Hard Warn/Grace   
    ---------- --------------------------------- 
    root            0      0      0  00 [------]
    guest        6.1M   200M   250M  00 [------]

    You can use the -i option to view a summary for inode usage. The -u, -g, and the -p options can be used to view summaries for user, group, and project quotas. The -h option returns information in human-readable format.

  • Use the df -h subcommand to view free and used counts for blocks and inodes.
    sudo xfs_quota -c 'df -h' /mnt

    By default, the output displays the block usage:

    Filesystem     Size   Used  Avail Use% Pathname
    /dev/sdc1    200.0G  32.2M  20.0G   1% /mnt

    Use the -i option to display inode usage:

    sudo xfs_quota -c 'df -ih' /mnt
    Filesystem   Inodes   Used   Free Use% Pathname
    /dev/sdc1     21.0m      4  21.0m   1% /mnt