Member
Support ~
Linux Admin User Guide
~ Assigning Quota
Assigning quota for a particular user
Here's an example. I have a user with the login id
martin on my system. And will set 5MB as the disk quota with maximum 1000
files. The command "edquota -u martin" takes me into
pico (or editor specified in $EDITOR environment variable)
to edit quota for user martin on each partition that has quota enabled:
# edquota -u martin
Quotas for user
martin:
/dev/hda1: blocks in use: 0, limits (soft = 5000, hard =
5000)
inodes in use:
0, limits (soft = 1000, hard = 1000)
|
"blocks in use" is the total number of blocks (in kilobytes) a user has
consumed on a partition.
"inodes in use" is the total number of files a user has on a partition.
set soft or hard to 0 mean no quota limit.
Assigning quota for a particular group
Now I have a group wwwuser on my system.
"edquota -g wwwuser" takes me into the
pico editor again to edit quota for the
group wwwuser:
# edquota -u martin
Quotas for group
wwwuser:
/dev/hda1: blocks in use: 0, limits (soft = 5000, hard =
5000)
inodes in use:
0, limits (soft = 1000, hard = 1000)
|
Soft Limit
Soft limit indicates the maximum amount of disk usage a quota user has on a partition. When combined with grace period, it acts as the border line, which a quota user is issued warnings about his impending quota violation when passed.
Hard Limit
Hard limit works only when grace period is set. It specifies the absolute limit on the disk usage, which a quota user can't go beyond his hard limit.
Grace Period
Executed with the command "edquota
-t", grace period is a time limit before the soft limit is enforced for a file system with quota enabled. Time units of sec(onds), min(utes), hour(s), day(s), week(s), and month(s) can be used. This is what you'll see with the command
"edquota -t":
To check the quota usage:
# repquota
|