Member-only story
Enable quota on XFS filesystem in Linux
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 thexfs_quota
utility with elevated privileges.-x
: Enables expert mode, allowing you to execute administrative commands like enabling quotas.-c 'enable'
: Passes theenable
command toxfs_quota
./
: Specifies the mount point of the XFS filesystem where you want to enable quotas.
Important Notes:
- Make sure that the XFS filesystem is mounted with quota options (
usrquota
orgrpquota
) in your/etc/fstab
or during mount time. For example:
/dev/sdX / xfs defaults,uquota,pquota 0 0
- Replace
/dev/sdX
with your actual device and/
with the mount point. - After adding the quota options, remount the filesystem:
sudo mount -o remount /
- Use
xfs_quota
to enable quotas:
sudo xfs_quota -x -c 'enable' /
- 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.