Member-only story

Fix XFS error on Linux “Can't enable enforcement when quota off

Luca Berton
2 min readDec 4, 2024

The error message Can't enable enforcement when quota off indicates that quotas are not enabled at the filesystem level yet. To resolve this, you need to ensure that the filesystem is mounted with quota options and then enable quotas using xfs_quota.

Steps to Fix:

  1. Check Current Mount Options: Use the following command to verify if the quota options are enabled on the filesystem:
mount | grep xfs
  1. Look for the usrquota or grpquota options. If they are missing, quotas are not enabled at the mount level.
  2. Update /etc/fstab to Enable Quotas: Edit the /etc/fstab file and add the usrquota and/or grpquota options to the mount point. For example:
/dev/sdX / xfs defaults,uquota,gquota 0 0
  1. Replace /dev/sdX with your actual device and / with the appropriate mount point.
  2. Remount the Filesystem: After updating /etc/fstab, remount the filesystem to apply the new options:
sudo mount -o remount /
  1. Enable Quotas: Once the filesystem is remounted with quota options, enable quotas using the xfs_quota command:
sudo xfs_quota -x -c 'report' /
  1. Verify Quotas: To confirm that quotas are now enabled, run:
sudo xfs_quota -x -c 'report' /

Additional Notes:

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet