4

I'm trying to enable quotas on Centos 7

I ran yum install quota

Edited fstab:

/dev/mapper/centos-root /                       xfs     defaults,usrquota,grpquota        0 0
UUID=6c443910-a7e9-4e97-8b51-de9d05407cf6 /boot                   xfs     defaults        0 0
/dev/mapper/centos-swap swap                    swap    defaults        0 0

And rebooted

When I try to create quota files I get an error:

quotacheck -cug /
quotacheck: Mountpoint (or device) / not found or has no quota enabled.
quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.
HBruijn
  • 77,029
  • 24
  • 135
  • 201
red888
  • 4,183
  • 18
  • 64
  • 111
  • 1
    Try using the xfs tools, https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/xfsquota.html – Federico Sierra Feb 16 '16 at 03:08

1 Answers1

3

The quota system for the XFS file system needs to be enabled and managed in a slightly different manner to how it is/was done with other file systems.

The mount option to enable quota is not quota but one or more of:

  • uquota/uqnoenforce - User quotas
  • gquota/gqnoenforce - Group quotas
  • pquota/pqnoenforce - Project quota

Each mount option can also be specified as <option>noenforce; this will allow usage reporting without actually enforcing any quota limits.

Once enabled quota and usage can be managed and reported with the dedicated xfs_quota tool.

HBruijn
  • 77,029
  • 24
  • 135
  • 201