Objective 4: Set and View Disk Quotas
Managing disk space can be a difficult problem. The available space is a finite resource and is often consumed at an alarming rate, turning today's carefully sized filesystem into tomorrow's expansion requirement. On multiuser systems—no matter how big the filesystem—users will find a way to fill it. The last thing you want is for a filesystem to fill to capacity too early. One way to prevent that from happening is to enforce disk quotas , which allow you assign a limit to the amount of space individual users or groups have on a filesystem.
A typical quota size is usually much smaller than the filesystem it is configured on, thus preventing the user or group from consuming too much space. Quotas can be configured for each filesystem mentioned in /etc/fstab, though they are usually applied only where multiple end users store files (i.e., /home/username). There is no need for a quota on /usr, for example, since end users cannot store files there. Quotas may be configured for individual users listed in /etc/passwd and for groups listed in /etc/group.
Each filesystem has up to five types of quota limits that can be enforced on it. These limits are specified in disk blocks, usually 1,024 bytes each:
- Per-user hard limit
The hard limit is the maximum amount of space an individual user can have on the system. Once the user reaches his quota limit, he won't be allowed to write files to the disk.
- Per-user soft limit
Each user is free ...