IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

Quota mini-HOWTO

Search Howtos :Match :
Next Previous Contents

4. Quota setup: tools

This operation is performed with the edquota command (`man edquota` for details).

4.1 Assigning quota for a particular user

Here's an example. I have a user with the login id bob on my system. The command "edquota -u bob" takes me into vi (or editor specified in my $EDITOR environment variable) to edit quota for user bob on each partition that has quota enabled:


Quotas for user bob: 
/dev/hda3: blocks in use: 2594, limits (soft = 5000, hard = 6500) 
         inodes in use: 356, limits (soft = 1000, hard = 1500)

"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 inodes a user has consumed on a partition.

4.2 Assigning quota for a particular group

Now I have a group games on my system. "edquota -g games" takes me into the vi editor again to edit quota for the group games:


        Quotas for group games: 
        /dev/hda4: blocks in use: 5799, limits (soft = 8000, hard = 10000) 
                inodes in use: 1454, limits (soft = 3000, hard = 4000)

4.3 Assigning quota for a bunch of users with the same value

To rapidly set quotas for, say 100 users, on my system to the same value as my user bob, I would first edit bob's quota information by hand, then execute:


edquota -p bob `awk -F: '$3 > 499 {print $1}' /etc/passwd`

assuming that you are using csh, and that you assign your user UID's starting with 500.

In addition to edquota, there are 3 terms which you should familiarize yourself with: Soft Limit, Hard Limit, and Grace Period.

4.4 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.

4.5 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.

4.6 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":


Time units may be: days, hours, minutes, or seconds 
Grace period before enforcing soft limits for users: 
/dev/hda2: block grace period: 0 days, file grace period: 0 days 

Change the 0 days part to any length of time you feel reasonable. I personally would choose 7 days (or 1 week).


Next Previous Contents
Search Howtos :Match :
PhpMyAdmin 3.1.2 rc1
Php front-end to MySQL administration
Xine 1.1.6
Free video player
Glade 3.5.5
User interface builder for GTK+ and Gnome
Evolution 2.25.4
GNOME mailer, calendar, contact manager and communications tool
GEdit 2.25.4
Small but powerful text editor
Mutt 1.5.19
Small but very powerful text-based mail client.
Galculator 1.3.2
GTK 2 based scientific calculator
GTK2 2.14.7
GUI Toolkit
WebGUI 7.5.38
A fully featured content management system.
Brasero 0.9.0
Application to burn CD/DVD
Free IT Magazines, White Papers, eBooks, and more !
Dr. Dobb's Journal

Dr. Dobb's Journal enables programmers to write the most efficient and sophisticated programs and help in daily programming quandaries.

The 7 Things that IT Security Professionals MUST KNOW!

Gain key insight into security problem and find the safest means to protect your technological assets.

Database Trends and Applications

Provides timely coverage of the technology, intelligence and insight needed to plan, implement and manage information-rich projects.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info