I need to provide the ability to create/read/write/delete files and set quotas for a large number of users of a web-service. These users do not exist as Linux users so I can’t apply quotas. The creation of real users just to perform quotas seems like a bad idea. Therefore, I decided to create a per-user file and mount it as a filesystem.
- What is the consequence of mounting of several tens of thousands of FS?
- Is there a limit on the total number of mounted FS?
There’s no need to create a zillion filesystems for this.
The easy way to do this is to create a directory for each user (which you already would have to do) and then check how much space the files in the directory use up each time a user tries to upload something. If the upload would cause them to exceed their limit, reject the upload. This is the way every other web application in the known universe does it.
P.S. You’ve scattered the details of what you’re doing throughout several comments; you should add them to the question instead so that people can find them (and perhaps reverse your downvotes).
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.