A disk quota is a limit set by a system administrator that restricts certain aspects of file system usage on modern operating systems. The function of using disk quotas is to allocate limited disk space in a reasonable way.[1]
Types of quotas
There are two basic types of disk quotas. The first, known as a usage quota or block quota, limits the amount of disk space that can be used. The second, known as a file quota or inode quota, limits the number of files and directories that can be created.
In addition, administrators usually define a warning level, or soft quota, at which users are informed they are nearing their limit, that is less than the effective limit, or hard quota. There may also be a small grace interval, which allows users to temporarily violate their quotas by certain amounts if necessary.
Quotas
Disk quotas are typically implemented on a per-user or per-group basis. That is, a system administrator defines a usage or file quota specific to a certain user or group. In some filesystems (e.g. ext4, XFS, f2fs, ZFS, Lustre) it is also possible to also define block and inode quota limits for a particular project or directory, by adding a project ID to files that directory tree and defining quota limits for the project ID.
In doing so, an administrator can prevent one user from consuming an entire file system's resources, or create a system of tiered access, whereby users can have different levels of restriction. This is used, for example, by web hosting companies to provide different levels of service based upon the needs and means of individual clients.
In most cases, quotas are also specific to individual file systems. Should an administrator want to limit the usage of a specific user on all file systems, a separate quota would have to be specified on each.
When a soft quota is violated, the system normally sends the user (and sometimes the administrator as well) some sort of message. No further action is typically taken.
Some systems prevent disk write operations that would result in hard quota violations from completing successfully, while others wait until the quota has been physically violated before denying write requests. The user is typically notified through the failed write operation error messages generated by the violating applications, while the administrator is almost always sent a notification as well.
Disk quotas are supported by most modern operating systems, including Unix-like systems, such as AIX (using JFS or JFS2 filesystem), Linux (using ext3, ext4, ext2, XFS (integrated support) among other filesystems), Solaris (using UFS or ZFS), Microsoft Windows starting with Windows 2000, Novell NetWare, VMS, and others. The method of administration for disk quotas varies between each of these operating systems. Unix-like systems typically provide a quota
command for both administration and monitoring; graphical front-ends to the command may also be used. Unix and Unix-like operating systems frequently feature a grace period where users may exceed their quota limits for a brief period of time. Windows 2000 and newer versions use the "Quota" tab of the disk properties dialog. Other systems provide their own quota management utilities.
Common Unix disk quota utilities
- quota - display a user's file system disk quota and usage;
- edquota - Edit user quotas for file system;
- setquota - Set disk quotas for file system;
- repquota - Summarize quotas for a file system;
- quotacheck - File system quota consistency checker;
- quotaon - Turn file system quotas on and off;
- /etc/fstab (Linux) or /etc/vfstab (Solaris) - list of default parameters for each file system including quota status.
See also
External links
References
- ^ Posodobitev, Zadnja (24 March 2023). "Disk quota system concept". IBM.com. Retrieved 8 April 2024.