UNIX filesystem quotas


Filesystem quotas were introduced in early BSD UNIX versions, and have since been implemented in most other UNIX versions and Linux. Often quota checking is an optional kernel configuration option that must be built in to the kernel before it can be used. Quota checking is tightly integrated with the filesystem code and to be effective it must be done within the kernel, and also has some performance impact since quota checks must be done as part of many file operations.

Quotas allow limiting the number of disk blocks and files ("inodes") that can be allocated to a user in a filesystem (some systems also implement group quotas that apply to files owned by a particular group). There are also two kinds of limits -- a "soft" limit that can be temporarily exceeded, and a "hard" limit that cannot be exceeded under any circumstances. Users can be over the soft limit for some grace period (although they are likely to get warnings about exceeding their quota), after which the system treats them as having reached the hard limit and prevents them from creating new files or extending previously existing files.

Quotas are somewhat controversial. Burgess thinks that overall, they're a bad idea, although his proposal to do automatic removal of files that users tend not to care about or that are considered administratively prohibited presents its own problems. In practice if you have a large number of user accounts with generally modest storage requirements I've found quotas seem to work well at preventing accidental (or worse, malicious) filling of filesystems.

Next ->


Steve VanDevender
Last modified: Wed Jul 25 14:49:36 PDT 2007