Quota is based upon filesystems, but you can always create a virtual filesystem and mount it on a specific (empty) directory with the usrquota and/or grpquota flags.
In steps this will be:
- create the mount point
- create a file full of /dev/zero, large enough to the maximum size you want to reserve for the virtual filesystem
- format this file with an ext3 filesystem (you can format a disk space even if it is not a block device, but double check the syntax of every – dangerous – formatting command)
- mount the newly formatted disk space in the directory you’ve created as mount point, e.g.
Code:
mount -o loop,rw,usrquota,grpquota /path/to/the/formatted/disk/space /path/of/mount/point
- Set proper permissions
- Set quotas
and the trick is done.