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.
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.
I have something to add here that I hope will help other people with the same problem.
I have a single XFS filesystem mounted with uquota. I have multiple users using the filesystem whom I want limited, and one single super user (we'll call her "lisa") whom I do NOT want limited. I also have a postgres database on here (owned by user "postgres") which I do not want limited.
I found the xfs_quota man page somewhat lacking in its description of how the default limits actually work and couldn't find any resource anywhere else so this is what I have discovered.
Set the default limits...
Terrific. All quotas are set and any new user that logs in will automatically receive the default limit. Now I'll exclude my superuser and postgres from the default by setting their limits explicitly to 0.
Now I'll get a report...
Looks great! Right? Wrong! Despite this report, both postgres and lisa are still limited and are still using the default limits. As soon as I attempt to write anything as either user and run the report again...
settings have reverted!
To get around this, you have to set the limits of the users you don't want limited to a non zero value. So set it to something very high. I set mine to a PB.
This prevents my super user and postgres database from being limited, while maintaining the "default" 50G limit for all other users.
A couple of things to note:
Hope this helps someone.
Edit: You can display more UIDs by specifying the upper limit. E.g.
Awesome!
Not sure how you missed this, if you did read the man page.
So you'll set a default quota something like: