Member-only story

Enable quota on XFS filesystem in Linux

Luca Berton
1 min readDec 4, 2024

The error message xfs_quota: cannot find user enable typically occurs because the xfs_quota command is interpreting "quota enable" as a command to enable quotas for a user named "enable," which is not correct.

Here’s how to fix this issue:

Correct Command

To enable quotas on an XFS filesystem, use the correct syntax:

sudo xfs_quota -x -c 'enable' /

Explanation

  • sudo xfs_quota: Runs the xfs_quota utility with elevated privileges.
  • -x: Enables expert mode, allowing you to execute administrative commands like enabling quotas.
  • -c 'enable': Passes the enable command to xfs_quota.
  • /: Specifies the mount point of the XFS filesystem where you want to enable quotas.

Important Notes:

  1. Make sure that the XFS filesystem is mounted with quota options (usrquota or grpquota) in your /etc/fstab or during mount time. For example:
/dev/sdX / xfs defaults,uquota,pquota 0 0
  1. Replace /dev/sdX with your actual device and / with the mount point.
  2. After adding the quota options, remount the filesystem:
sudo mount -o remount /
  1. Use xfs_quota to enable quotas:
sudo xfs_quota -x -c 'enable' /
  1. Verify the quota status with:
sudo xfs_quota -x -c 'report' /

If you still encounter issues, ensure that the filesystem is XFS and that quota options are enabled in the mount configuration.

--

--

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