LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-27-2009, 01:52 AM   #1
stg_in2009
LQ Newbie
 
Registered: Jan 2009
Posts: 6

Rep: Reputation: 0
About disk quota for users


Hello All,

I am new to Linux administration. Basically I am ClearCase Admin, now asked to take care of Linux Admin as well.
Here we want to implement each users /home dir quotas to restrict memory usage by the users. We have RHEL3 server and it is a running server. There are many users who work in this server. Many users are consuming more memory space in their home directory (some using 200MB some 800MB so on..). If I want to restrict them to use only upto 10 MB for each users what will happen for those users who are already using more than 10 MB space?
I also went though the man pages of disk quota but I am confused. So anyone please do help me out. How to acheive in implementing the users quota for their home directories with 10 MB. It should not store more than 10 MB and should give error for the users if it exceeds more than 10 MB.

Thanks in Advance.
Regards

STG
 
Old 04-27-2009, 02:57 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
For a partition to implement quotas, it must be mounted with the usrquota or grpquota options. Edit /etc/fstab, adding the usrquota option to the /home partition:

mount -o remount /home

The disk usage database is stored within a partition's top-level directory in specially named binary files, aquota.user and aquota.group. Use quotacheck -cug to create a new user and group quota file. Skip the 'g' option if you want only user quotas.

You can turn the quotas on with
quotaon /home
You may find this is run in /etc/rc.d/rc.sysinit if quotas are set on.

you can force a rebuild of the quota db with
quotacheck -c /home

You set a quota like this

setquota username 4096 5120 40 50 /foo

where the nums are
1. soft block limit (warns if exceeded)
2, hard block limit (cannot be exceeded)
3. soft inode limit
4. hard inode limit

you can copy quota limits from one user to another:

edquota -p user1 user2

copies user1 limits to user2

See also: http://www.linuxtopia.org/online_boo...sk-quotas.html
 
Old 04-27-2009, 03:42 AM   #3
stg_in2009
LQ Newbie
 
Registered: Jan 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Hi Chris,

Thanks alot for your help. I will update you after implementing. The link that you have mentioned is very useful.
Thanks once again.

Regards

STG
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a disk quota to all samba users on LDAP jax8 Linux - Server 6 12-29-2009 03:33 AM
Problem with quota for users. wegadnie Linux - General 9 12-24-2008 01:23 AM
How to assign disk quota(disk space limited) to user and group. hocheetiong Linux - Newbie 1 08-24-2007 04:20 AM
Disk Quota -- restricrting users as well as stopping Denial of Service Attacks tataiermail LinuxAnswers Discussion 0 07-10-2007 01:40 PM
quota for email of users monin Linux - Newbie 4 05-18-2002 02:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration