Disk Quotas Explained
How Disk Quotas Limit Storage Use
A disk quota is a limit on how much storage a user, group or account may use on a disk or file system. When the limit is reached, the system refuses new data or warns the owner, depending on how the quota is set up.
Quotas matter when several accounts share one physical disk. Without them, one account that stores large backups, runaway log files or forgotten uploads can fill the disk, and every other account then fails to save files.
The file system counts the blocks, the fixed-size units it uses to store data, that each owner occupies, and compares that total with the limit. Quotas are usually set per user or per group.
Soft Limits, Hard Limits and Grace Periods
Most quota systems use two thresholds. A soft limit is a warning level that the owner may exceed for a set period, called the grace period. A hard limit is the absolute ceiling. Writes fail as soon as it is reached, and no grace period applies.
For example, an account might have a soft limit of 900 MB, a hard limit of 1 GB and a grace period of seven days. The owner can go past 900 MB for up to a week and receives warnings. Above 1 GB, new writes are refused even within that week.
A Shared Server With and Without Quotas
Consider a shared server with fifty customer accounts on one disk. One customer's application begins writing debug logs in a loop and fills the disk within a day. Without quotas, every site on the server stops saving files, and the mail service can no longer write messages.
With a hard quota of 5 GB per account, the same runaway log stops at 5 GB. The affected customer sees errors in their own application, while the other forty-nine accounts keep working. The problem stays inside the account that caused it. To see what fills an account in the first place, read about disk space in hosting.
Frequently asked questions
What happens when a disk quota is reached?
When a hard limit is reached, the system refuses new writes, so uploads, saves and log entries fail. Applications often show errors until space is freed. When only a soft limit is passed, the owner usually receives a warning and can keep working until the grace period ends. Deleting files frees space under the quota.
Is a disk quota the same as disk space?
No. Disk space is the total capacity of a disk or hosting plan. A quota is a limit set for one user, group or directory inside that space. A quota can be lower than the free space on the disk, so an account can be blocked even when the disk still has room. A separate limit on the number of files, rather than bytes, is covered under inodes.