home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 24.16 Trimming a Huge Directory Chapter 24
Other Ways to Get Disk Space
Next: 24.18 Huge Files Might Not Take a Lot of Disk Space

24.17 Disk Quotas

No matter how much disk space you have, you will eventually run out. One way the system administrator can force users to clean up is to impose quotas on disk usage. BSD UNIX supports a disk quota system that will enforce the quotas the system administrator sets up. Prior to V.4, System V had no quota system at all. In Release V.4, System V supports quotas for BSD-style (UFS) filesystems.

If you're a user, how do quotas affect you? Sooner or later, you may find that you're over your quota. Quotas are maintained on a per-filesystem basis. They may be placed on disk storage (the number of blocks) and on inodes (the number of files). The quota system maintains the concept of hard and soft limits. When you exceed a soft limit, you'll get a warning ( WARNING: disk quota exceeded ), but you can continue to accumulate more storage. The warning will be repeated whenever you log in. At some point (i.e., after some number of sessions in which the storage stays above the soft limit), the system loses patience and refuses to allocate any more storage. You'll get a message like OVER DISK QUOTA: NO MORE DISK SPACE . At this point, you must delete files until you're again within the soft limit. Users are never allowed to exceed their hard limit. This design allows you to have large temporary files without penalty, provided that they do not occupy too much disk space long-term.

There may also be a quota on the number of files (i.e., inodes ( 1.22 ) ) you can own per filesystem. It works exactly the same way; you'll get a warning when you exceed the soft limit; if you don't delete some files, the system will eventually refuse to create new files.

- ML

Previous: 24.16 Trimming a Huge Directory UNIX Power Tools Next: 24.18 Huge Files Might Not Take a Lot of Disk Space
24.16 Trimming a Huge Directory Book Index 24.18 Huge Files Might Not Take a Lot of Disk Space

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System