Enabling Disk Quotas on File Systems

Disk quota types are enabled at mount by specifying a mount option.

Mount Option Description

gqnoenforce

Enable group quotas. Report usage, but don't enforce usage limits.

gquota

Enable group quotas and enforce usage limits.

pqnoenforce

Enable project quotas. Report usage, but don't enforce usage limits.

pquota

Enable project quotas and enforce usage limits.

uqnoenforce

Enable user quotas. Report usage, but don't enforce usage limits.

uquota

Enable user quotas and enforce usage limits.

Mounting a File System With Quotas Enabled

Mount a file system from the command line with a quota type enabled.

If a file system doesn't have a system mount configured in /etc/fstab or the entry doesn't include a quota option, you can enable the quota option when you mount the file system from the command line.
  1. Mount the file system from the command line using the -o <quotatype> option to enable the specified quota.
    For example, to enable user quotas, run:
    sudo mount -o uquota /dev/sdb1 /mnt

    Replace uquota with uqnoenforce to enable usage reporting without enforcing any limits.

Editing System Mounts to Use Quotas

Edit /etc/fstab to add quota options to a file system entry, to enable quotas when the file system is remounted.

  1. Install the quota package on the system, if not already installed.
    sudo dnf install -y quota
  2. Add the quota type options to the file system's /etc/fstab entry.

    For example, to add the uquota and gquota types, you can add:

    /dev/sdb1    /home     xfs    defaults,uquota,gquota   0 0
  3. Remount the file system.
    sudo mount -o remount /home