Apply Quota to Allow a Maximum Amount of Files

A completely different way to apply restrictions to the way users can create files and directories is to use a user quota, a system to limit the amount of available storage space. Configuring user quotas is a five-step procedure:

1. Install the quota software.

2. Prepare the file system where you want to use the quota.

3. Initialize the quota system.

4. Apply the quota to users and groups.

5. Start the quota service.

Before starting to apply the quota, you should realize how it must be applied. Quotas are always user or group related and apply to a complete volume or partition. That is, if you have one disk in your server with one partition on it that makes your complete root file system and you apply a quota of 100MB for user alex, this user can create no more than 100MB, no matter where on your server.

When working with quotas, you need to apply a hard limit, a soft limit, and a grace period. The soft limit is a limit that cannot be surpassed on a permanent basis. That is, a user can create more files than the quota allows on a temporary basis. The period for which this is allowed is defined by the grace period. There is also a hard limit, which is an absolute limit. When this limit is reached, it is impossible for the user to create new files.

Working with soft and hard limits is confusing at first but has some advantages. If a user has more data than the soft limit allows, the user still can create new files and isn't stopped from working immediately. The user will, however, get a warning about needing to clean up files, because when the hard limit is reached, no more new files can be created whatsoever.

Was this article helpful?

0 0

Post a comment