LinuxCommandLibrary

repquota

Summarize disk quota information for a filesystem

TLDR

Report stats for all quotas in use

$ sudo repquota [[-a|--all]]
copy

Report quota stats for all users, even those who aren't using any of their quota
$ sudo repquota [[-v|--verbose]] [filesystem]
copy

Report on quotas for users only
$ repquota [[-u|--user]] [filesystem]
copy

Report on quotas for groups only
$ sudo repquota [[-g|--group]] [filesystem]
copy

Report on used quota and limits in a human-readable format
$ sudo repquota [[-s|--human-readable]] [filesystem]
copy

Report on all quotas for users and groups in a human-readable format
$ sudo repquota [[-augs|--all --user --group --human-readable]]
copy

SYNOPSIS

repquota [options] [filesystem...]

PARAMETERS

-a, --all
    Report quotas on all currently mounted file systems that have quota support enabled in /etc/fstab and are mounted with quota options.

-u, --user
    Report user quotas. This is the default behavior if no quota type is specified.

-g, --group
    Report group quotas.

-v, --verbose
    Display additional information about the quota-enabled file systems being processed, including their mounted status.

-s, --human-readable
    Display sizes (blocks and inodes) in human-readable units (e.g., K for kilobyte, M for megabyte, G for gigabyte, T for terabyte).

-t, --time-statistics
    Report statistics for time limits (grace periods), showing remaining time until a soft limit becomes a hard limit.

-i, --no-details
    Display only summary lines for each file system, omitting the detailed per-user or per-group information.

-n, --no-names
    Do not attempt to resolve numeric UIDs/GIDs to user/group names; display the numeric IDs instead.

-p, --punishment
    Do not honor grace periods. Report all users/groups who are over their soft limit as if they are already over their hard limit, showing them as 'OVER'.

-F, --format=<format>
    Specify the quota file format to use. Common formats include vfsold (for old style quotas), vfsv0, vfsv1, and xfs.

DESCRIPTION

The repquota command provides a summary of disk usage and quota limits for users or groups on a given file system, or across all quota-enabled file systems. It is primarily used by system administrators to monitor compliance with configured disk space limits and identify users or groups exceeding their allocated resources.

Unlike the quota command, which shows individual user/group quotas for the current user, repquota generates a comprehensive, aggregated report for all users or groups with entries in the quota files on the specified file system. The output typically includes user or group ID, current block usage, soft and hard block limits, inode usage, and soft and hard inode limits. It also indicates the status of grace periods if soft limits have been exceeded, showing time remaining or if the limit is exceeded.

repquota gathers its information by reading the quota files (e.g., aquota.user, aquota.group for ext4/xfs) or by interacting directly with the kernel's quota subsystem. Running repquota usually requires root privileges to access and display quota data for all users and groups across the system.

CAVEATS

To use repquota, the filesystem must be mounted with the appropriate quota options (e.g., usrquota, grpquota in /etc/fstab) and the quota system must be active via quotaon. For a complete system-wide report, repquota typically requires root privileges. While repquota can report on XFS filesystems using the -F xfs option, the xfs_quota command is often preferred for more granular and native XFS quota management features.

UNDERSTANDING OUTPUT COLUMNS

The typical output of repquota provides a tabular report with several key columns:
Filesystem: The mounted filesystem being reported on.
User/Group Name: The identifier (name or UID/GID) for the user or group.
Blocks: The current disk space used by the user/group, usually in kilobytes.
Quota: The soft block limit. Exceeding this triggers a grace period.
Limit: The hard block limit. Exceeding this prevents further writes.
Grace: Indicates the status of the grace period for blocks. Shows remaining time, or 'none' if within limits, or 'OVER'/'--' if grace period expired or hard limit exceeded.
Files (Inodes): The current number of inodes (files and directories) used.
Quota (Inodes): The soft inode limit.
Limit (Inodes): The hard inode limit.
Grace (Inodes): Indicates the status of the grace period for inodes.

GRACE PERIODS EXPLAINED

A grace period is a temporary allowance granted when a user or group exceeds their soft limit for blocks or inodes. During this period, they can continue to use disk space or create files. If the usage remains above the soft limit after the grace period expires, the soft limit effectively becomes a hard limit. This means that no further writes or file creations will be permitted until the usage drops below the soft limit. repquota is crucial for administrators to monitor the status and remaining time of these grace periods, enabling proactive management before hard limits are enforced.

HISTORY

The repquota command has been a fundamental part of the Linux quota tools suite for many years, evolving alongside the kernel's increasing support for disk quotas and various filesystem types. It is part of the standard quota package, which provides a comprehensive set of utilities for managing disk space limits. Its development has seen adaptations to new quota file formats (such as vfsv0 and vfsv1) to support modern filesystems. Although specialized tools like xfs_quota emerged for specific filesystem features, repquota remains a widely used general-purpose reporting tool.

SEE ALSO

quota(1), quotacheck(8), quotaon(8), quotaoff(8), edquota(8), xfs_quota(8)

Copied to clipboard