Linux online course

Linux Disk Quota Reporting with repquota

Learn how to use Linux repquota to inspect user and group disk quotas, block and inode limits, grace periods, and quota warnings.

Disk quotas control how much storage a user or Unix group can consume on a file system. They can limit both disk blocks, which represent space usage, and inodes, which represent files and directories.

repquota is a reporting command from the Linux quota tools. It summarizes quota usage and limits for a mounted file system so an administrator can identify accounts that are approaching or exceeding their allocation.

What repquota does—and does not do

Quota administration has several separate tasks:

  • Reporting: repquota displays current usage, limits, and status.
  • Setup: quota support and quota mount options must be configured for the file system.
  • Accounting: quota data must be maintained so usage can be measured.
  • Enforcement: quota enforcement must be active before limits can prevent further allocation.
  • Editing: tools such as edquota change limits and grace periods.

Running repquota does not enable quotas, create quota databases, change limits, or repair quota accounting. It reports the quota records that are already configured and available.

repquota command fundamentals

The basic command form is:

sudo repquota FILESYSTEM

FILESYSTEM identifies the file system to inspect. Depending on the local quota configuration and quota-tools version, this can be a device path, a mount point, or another supported file-system reference.

For useful output, the target must normally be mounted and quota support must be configured for it. The command also needs access to the quota metadata. Administrative privileges are normally required to inspect complete data, so examples use sudo.

Common reporting options

OptionPurposeExample
No scope optionReport quota data for the specified file system.sudo repquota /dev/sdc1
-aReport applicable quota-enabled file systems listed in /etc/fstab.sudo repquota -a
-uShow user quota records.sudo repquota -u /dev/sdc1
-gShow group quota records.sudo repquota -g /dev/sdc1

Report quota usage for one file system

When investigating a full partition or a particular mount, target that file system directly. The following example examines the file system represented by /dev/sdc1:

sudo repquota /dev/sdc1

The output summarizes quota records for that file system. Read current block and inode usage alongside their soft limits, hard limits, grace information, and warning markers.

Targeting one file system is useful when:

  • df shows that one partition is nearly full.
  • A mounted project, home, or application file system needs a focused audit.
  • You want to avoid mixing records from several file systems in a broad report.

Report all configured quota file systems

The -a option asks repquota to report across file systems listed in /etc/fstab that have applicable quota support configured:

sudo repquota -a

This is convenient for a system-wide quota audit. It depends on accurate persistent mount entries and quota options in /etc/fstab. It does not necessarily include every transient, manually mounted, or otherwise absent file system. If a file system is missing from the all-filesystem report, run repquota against that file system directly and inspect its configuration.

User and group quota scopes

A user quota applies to one individual account. It measures the resources charged to that user on a file system.

A group quota applies to a Unix group and represents shared usage charged to that group. A group can approach its collective limit even when every individual member remains below their personal limit.

Quota typeApplies toTypical useReport option
User quotaAn individual user account.Auditing home directories or personal allocations.-u
Group quotaA Unix group and its shared allocation.Auditing department, project, or team storage.-g

To inspect individual accounts on the example file system:

sudo repquota -u /dev/sdc1

To inspect shared group allocations:

sudo repquota -g /dev/sdc1

Both user and group quota types can be enabled on the same file system. Use the scope that matches the question being investigated.

Understanding repquota output

Output layouts vary between Linux distributions and quota-tools versions. The exact headings and warning symbols may differ, but reports generally contain an identity, block accounting fields, and inode accounting fields.

Blocks and inodes

  • A block is a unit used to account for disk-space consumption. Quota reports commonly display blocks in 1 KiB units unless command options, environment settings, or the local tool version alter the presentation.
  • An inode is file-system metadata representing a file or directory. Inode quotas limit the number of file-system objects, not their total byte size.
Field or indicatorMeaningAdministrative action
IdentityA user name, group name, or numeric ID associated with the record.Identify the account or group responsible for the usage.
Current block usageDisk-space consumption charged to the identity.Compare it with the block soft and hard limits.
Block soft limitA block-usage threshold that may be exceeded temporarily.Investigate increasing usage before the grace period expires.
Block hard limitThe absolute block-usage ceiling.Reduce usage or change the allocation according to policy.
Block grace statusRemaining or applicable time for usage above the block soft limit.Prioritize accounts with an active or expired grace period.
Current inode usageThe number of files and directories charged to the identity.Check this even when plenty of disk space remains.
Inode soft limitA temporary threshold for the number of inodes.Remove unnecessary objects or plan an allocation change.
Inode hard limitThe maximum permitted inode usage.Reduce the object count or adjust the quota according to policy.
Inode grace statusGrace information for exceeding the inode soft limit.Act before the grace period expires.
Limit-exceeded markersSymbols or status characters indicating a block or inode limit condition.Use the local command documentation to identify each marker, then inspect the corresponding fields.

Do not assume that a number is bytes. Treat displayed block values as 1 KiB blocks unless the local repquota documentation says otherwise. Also read the column headings carefully because formatting and marker conventions can differ.

Soft limits, hard limits, and grace periods

A soft limit is a threshold that can usually be exceeded temporarily. Once usage passes the soft limit, a grace period gives the user or group time to reduce usage. The report may show the remaining grace time or indicate that the period has expired.

A hard limit is an absolute ceiling. When a user or group reaches it, the file system can reject additional allocation in the controlled resource. For block quotas, this can prevent more disk space from being allocated. For inode quotas, it can prevent creation of additional files or directories even when free blocks remain.

To identify quota pressure:

  1. Find identities whose current block usage is near or above the block soft limit.
  2. Check whether the block hard limit has been reached.
  3. Repeat the comparison for current inode usage and inode limits.
  4. Read grace information and warning markers.
  5. Decide whether to remove data or files, move data, or change the quota according to local policy.

Practical quota reporting workflow

A focused investigation can use the following sequence:

# Report all applicable configured file systems
sudo repquota -a

# Focus on users on one file system
sudo repquota -u /dev/sdc1

# Focus on groups on the same file system
sudo repquota -g /dev/sdc1

Start with the broad report when performing a routine audit. Then target a specific device or mount point and select either user or group scope when investigating an alert.

Troubleshooting repquota reports

The report is empty or expected accounts are missing

  • Confirm that the target file system is mounted.
  • Verify that quota accounting is enabled for that file system.
  • Check whether you requested user records with -u or group records with -g.
  • Confirm that the device or mount point is the intended target.
  • Remember that no records may exist yet for the selected scope.

repquota -a omits a file system

  • Inspect the relevant /etc/fstab entry.
  • Check whether the mount is temporary or was created manually.
  • Verify that quota options and quota accounting are configured.
  • Run a direct report such as sudo repquota /dev/sdc1 to test the target independently.

Permission denied or incomplete data

Run the command through sudo. Quota metadata is often readable only by an administrator or a process with the required privileges. If sudo does not resolve the problem, verify that the metadata exists and is readable and that the file system is mounted with quota support.

A user cannot create files even though the disk has free space

Inspect both resource types. The user may have reached an inode hard limit, reached a block hard limit, or exceeded a soft limit whose grace period has expired. Check the user report, compare current usage with both limits, and read the grace fields. The remedy may be to remove files, reduce stored data, move data, or adjust the quota according to policy.

Reported sizes seem unexpectedly large or small

Quota blocks are accounting units, not automatically byte values. Confirm the output-unit behavior of the installed quota-tools version and normally interpret a displayed quota block as 1 KiB unless local documentation indicates a different unit or scaling.

Exam-relevant notes

  • repquota reports quota usage; it is not the command used to define or edit quota limits.
  • -u selects user quota records, while -g selects group quota records.
  • -a reports applicable quota-enabled file systems from /etc/fstab; it is not guaranteed to discover every manually mounted file system.
  • Always inspect both block and inode columns. Free disk blocks do not help when an inode limit has been reached.
  • A soft limit can be exceeded during its grace period; a hard limit is the absolute ceiling.
  • Administrative privileges and active quota configuration are normally required for a complete report.

For related storage investigation, compare quota results with file-type information and your system's file-system usage tools. When command lookup matters, review how to show the full path of a shell command.