Does XFS support default quotas?

Systemspoet asked:

We need to set a default quota for all users. From what I can see from man 8 xfs_quota, you can only set quotas for individual users. I need to set a quota that applies to everyone without having to enumerate each user.

My answer:

Not sure how you missed this, if you did read the man page.

limit [ -gpu ] bsoft=N | bhard=N | isoft=N | ihard=N | rtbsoft=N | rtb‐
   hard=N -d | id | name
       Set  quota  block  limits  (bhard/bsoft),  inode  count   limits
       (ihard/isoft)  and/or  realtime  block limits (rtbhard/rtbsoft).
       The -d option (defaults) can be used to set  the  default  value
       that  will be used, otherwise a specific user/group/project name
       or numeric identifier must be specified.

So you’ll set a default quota something like:

# xfs_quota -x -c 'limit bsoft=1g bhard=1g -d' /home

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.