Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I use Quota?

Status
Not open for further replies.

Yescha

Programmer
Aug 10, 2002
16
CA
Hello;
I tried to use quota in my Redhat Linux 7.2 server. But, when I installed the program, I installed just utilities and networking programs only. Most of program I installed later with source or rpm.
I saw that for using quota file systems must be checked=> (*) Quota support. If so then, how can I check it or how can I know Quota support is checked in my system.
Please, if any one knows the solution, it will be a great help.

BYE!!!

Chakra, South korea
 
Here's some notes that I wrote on Linux quotas awhile back. It might look a little messed up because all of the formattig (bold, underline, different font sizes, etc..) isn't going to show in the forum.



Quotas
- quotas limit the amount of available space to a user or group
- quotas can only be applied to a partition
- hard limits are maximum amount of space a user can have on the system
- soft limits send a warning instructing the user to clean up while still allowing her to work, when the user reaches a specified limit
- when a user reaches a soft limit, it enters a grace period. When the grace period ends, the soft limit becomes a hard limit

Enabling Quotas
1. Edit the fourth field in /etc/fstab to include either usrquota, grpquota, or both
• /dev/hda3 /home ext2 defaults,usrquota,grpquota 1 2
2. Create the quota.user and quota.group files at the root of the partion. In this example, you would create /home/quota.user and /home/quota.group.
3. Set the permissions on this file 600.
4. Run ‘quotacheck -avug’ to initialize the databases (quota.user and quota.group)
5. Check the /home/quota.* files sizes to make sure they aren’t a size zero anymore
6. Run ‘quotaon -a’ to enable the quota system
7. Verify your systems initialization script will turn on quotas.
8. Add a command script to a system crontab directory (/etc/crontab.weekly) to execute quotacheck on a routine basis - ‘quotacheck -avug’

quota
- displays quota limits on user or group
- quota -q - shows only over-quota situations
- quota -v - displays quotas even if no storage space is allocated
- quota -u - view a users quota (only root can do this)
- quota -g - view group limits

quotaon
- enables quotas on one or more filesystems
- quotaon -a - turns quotas on for all fileystems in /etc/fstab that are marked
- quotaon -v - displays a message for each filesystem where quotas are turned on

quotaoff
- disables disk quotas on one or more filesystems
- quotaoff -a - turns quotas off for all filesystems in /etc/fstab
- quotaoff -v - displays a message for each filesystem where quotas are turned off

quotacheck
- examine filesystems and compile quota databases
- quotacheck -avug should be run on a routine basis using cron
- quotacheck -a - checks all of the quotas for the filesystems mentioned in /etc/fstab
- quotacheck -v - verbose mode

edquota
- modify user or group quotas using a text editor (vi is the default)
- edquota -u - modify user quotas (default action) - this is ignored if -g is used
- edquota -g - modify group quotas
- edquota -p - duplicate quotas of the prototypical user or group proto-user for each user or group specified. This is the normal mechanism used to initialize quotas for multiple users or groups at the same time.
- edquota -t - modify soft limits

repquota
- used to report on the status of quotas
- repquota reads the quota.user and quota.group files
- repquota -a - reports on all quotas mentioned in /etc/fstab
- repquota -g - reports on group quotas
- repquota -u - reports on user quotas (default)
- repquota -v - adds a descriptive head to the output



ChrisP ------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says "Mark this post as a helpful/expert post".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top