On Wed, 7 Apr 1999, Dane Jasper wrote:
I wasn't aware that you could do default per-user quotas, so I decided to give this a try. After fixing up a couple important folks like root and www so that they would have no quota, I have the following:
# Quota Target type disk files # ------------- ----- ---- -----
user@/vol/vol0 999M 50K
0 user 999G 999K 15 user 999G 999K 25 user 999G 999K
Maybe, I'm reading this wrong but I see all the users having quotas. The default setting takes precedence over any lines following it. Am I wrong?
Sorry. :-)
Here's how quotas work:
First the quota command reads the entire quota file, creating an in-memory data structure associated with each entry in the quota file.
After this, the quota command triggers a background process to scan all inodes, updating the quota entries appropriately.
If there is a default quota, then whenever the scanner finds an inode with a UID (or GID) that has no existing quota, then it creates a new quota based on the default quota.
So you can see, it doesn't matter where the default quota is in the quota file, because the entry based on the default won't be created until the scanning process, which occurs after the entire quota file has been read. If there's a specific user quota anywhere in the quota file, then when the scanning occurs, there won't be any need to create a new quota based on the default, because there will already be one.
Dave