I would probably look into using container files that contain a file system. These can be mounted using a loop device. You could have one container file per user. Each container file could be whatever size that user needs. It would be impossible for the database contained in each container file to exceed the size of the container file. The container files are all owned by root so they cannot be deleted by the end user. Once the container file is mounted as a file system then the file ownership of the database files takes over.
The only real drawback is that your backups would back up the container files so the backup would include the free space in the container files. You could get around this but I think it is better to back up the container files than to back up the contents in the mounted container files.
I'm a big advocate of using container files instead of disk quotas. I think that the container files require less CPU than disk quotas. I've never proven this experimentally though.
Last edited by stress_junkie; 07-10-2007 at 02:59 PM.