Lowyat.NET Forums

Welcome Guest ( Log In | Register )

LYN wins Intel-Lenovo-Tangs Blogathon challenge. Thank you everybody!
 
RSS feedBump TopicReply to this topicStart new topicStart Poll

Outline · [ Standard ] · Linear+

> Red Hat 9, how to configure user quota

karmakid
post Jun 15 2005, 03:25 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #1


Look at all my stars!!
*******

Group: Senior Member
Posts: 2,589
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: PJ





well, i'm trying to allocate a limit of, let say 100mb per user account....
are there such commands for me to do so?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
kons
post Jun 15 2005, 03:45 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #2


smallpox
Group Icon
Linux & Networking

Group: Moderator
Posts: 3,789
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Oct 2004
From: linux/kernel/panic.c





Of course.
No problem at all.
It has been there since the time of RH6.

Very straightforward.
Buckle your seatbelt.
Here we go!

0)Log in as root.

1)Edit file /etc/fstab to add the word "usrquota" to the partition.
Eg:-
dev/hda2 / ext3 defaults,usrquota

2)Make a blank file "aquota.user" to output the quota report. Make it so only root can access it.
touch /aquota.user
chmod 600 /aquota.user

3)Remount the partition (to apply the changes we made to fstab)
mount -o remount /

4)Record the partition information into the aquota.user
quotacheck -vguma

5)enable disk quotas on a file system -> quotaon
turn off disk quotas for a file system -> quotaoff

6)Edit user quota based on user_id -> edquota -u user_id

7)Display quota information for user_id -> quota -u user_id

If you're not sure about each command, use man commandname to check out the available parameters for each command.

Might want to add quota check procedures into the cron

My example is based on the partition "/"..
You can put the quota on any other partition..
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Mizan
post Jun 15 2005, 09:22 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #3


Getting Started
**

Group: Junior Member
Posts: 70
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: Server Farm




u may use control panel to do so, like webmin or plesk smile.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
karmakid
post Jun 16 2005, 08:43 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #4


Look at all my stars!!
*******

Group: Senior Member
Posts: 2,589
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: PJ





E325: ATTENTION
Found a swap file by the name ".fstab.swp"
owned by: root dated: Wed Jun 15 15:51:34 2005
file name: /etc/fstab
modified: YES
user name: root host name: test
process ID: 7071
While opening file "fstab"
dated: Sat Feb 19 22:36:58 2005

(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.

(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r fstab"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".fstab.swp"
to avoid this message.

Swap file ".fstab.swp" already exists!
[O]pen Read-Only, (E)dit anyway, ®ecover, (Q)uit, (D)elete it:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
karmakid
post Jun 16 2005, 08:45 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #5


Look at all my stars!!
*******

Group: Senior Member
Posts: 2,589
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: PJ





well, i use the non-gui interface...
anyhow, i wanna try ur method yesterday by going "vi fstab".
half way, the screen went cacat (i guess tat's because i use the scroll mouse). i'm not sure if i accidentally type wrong or anything. to avoid any error, and i jst quit on the the cygwin by clicking on the X button at the top right..
when i try to open back again "vi fstab", i have the error above..
any idea what i should do? i dont want to overwrite the original file.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
kons
post Jun 16 2005, 09:09 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #6


smallpox
Group Icon
Linux & Networking

Group: Moderator
Posts: 3,789
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Oct 2004
From: linux/kernel/panic.c





Did you edit anything prior to the crashing?
If you have edited something prior to the crashing, then choose recover in this window.
If you're sure that there's no difference between the two fstab, just remove that fstab.swp
This is just a normal situation when the system crashed while we are editing files using vi.
blush.gif
If you're not sure of something, remember to do backup of the file first before making any changes.
I'll be around if you need any help.

Cheers.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
karmakid
post Jun 16 2005, 11:36 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #7


Look at all my stars!!
*******

Group: Senior Member
Posts: 2,589
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: PJ





(Swap file ".fstab.swp" already exists!
[O]pen Read-Only, (E)dit anyway, Žecover, (Q)uit, (D)elete it: )

i'm not sure if i edit or anything or not...ok..assuming that i've edited it, but i dont want the new copy..i want back the original copy (the one be4 i edit)...which option i should choose?
-recover? (meaning?)
-quit?
or
-delete (meaning del the new file or the original one?)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
kons
post Jun 16 2005, 11:42 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #8


smallpox
Group Icon
Linux & Networking

Group: Moderator
Posts: 3,789
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Oct 2004
From: linux/kernel/panic.c





Since you are not sure also, just delete that *.swp file.
Usually if we don't issue wq in vi, it won't be saved.
Cheers.

This post has been edited by kons: Jun 16 2005, 11:44 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
karmakid
post Jun 16 2005, 12:12 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #9


Look at all my stars!!
*******

Group: Senior Member
Posts: 2,589
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: PJ





i c...so kons, correct me if i'm wrong..

-recover -> to use the edited one to overwrite the original copy (something like microsoft word, to restore back the last saved file?)

-quit -> i stil dunno what this for

-delete -> to del the edited version, while maintaining back the original fstab file in the server?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
kons
post Jun 16 2005, 12:16 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #10


smallpox
Group Icon
Linux & Networking

Group: Moderator
Posts: 3,789
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Oct 2004
From: linux/kernel/panic.c





Hey, that's right.
Btw, I didn't know that you're using cygwin.
Hope it works well.
Cheers!

P/S: Quit is for ignoring everything and quit the vi editor. Wont make any changes.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
karmakid
post Jun 16 2005, 12:42 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #11


Look at all my stars!!
*******

Group: Senior Member
Posts: 2,589
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: PJ





i c...so for this case (since i'm using cygwin), i can choose either quit or del the file lah...cause my main concern is maintaining my original file mah for fstab..
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
kons
post Jun 16 2005, 12:46 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #12


smallpox
Group Icon
Linux & Networking

Group: Moderator
Posts: 3,789
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Oct 2004
From: linux/kernel/panic.c





Bear in mind that the edited file is in the *.swp file.

Cheers
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
karmakid
post Jun 16 2005, 02:28 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #13


Look at all my stars!!
*******

Group: Senior Member
Posts: 2,589
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: PJ





i c....so, can i say that for all VI edited file, if the system hanged or reboot, it will auto saved into swp files?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
kons
post Jun 16 2005, 02:32 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #14


smallpox
Group Icon
Linux & Networking

Group: Moderator
Posts: 3,789
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Oct 2004
From: linux/kernel/panic.c





That's right.

Cheers!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
karmakid
post Jun 16 2005, 03:00 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #15


Look at all my stars!!
*******

Group: Senior Member
Posts: 2,589
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: PJ





arigatou....
do u have a msn ah?
can i add u in?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
kons
post Jun 16 2005, 03:46 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #16


smallpox
Group Icon
Linux & Networking

Group: Moderator
Posts: 3,789
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Oct 2004
From: linux/kernel/panic.c





don't thank me yet as long as your problem is unsolved.
i'm still learning too. biggrin.gif
yeah, I do have msn, since most of them I'm still stickin to Windows for software development.
I only use msn for chatting and relaxing after my work.
If you have questions on this open source thinggy or anything, please make good use of this forum.
I'll be in this forum all the time.

Cheers!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
karmakid
post Jun 16 2005, 04:24 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #17


Look at all my stars!!
*******

Group: Senior Member
Posts: 2,589
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003
From: PJ





okie lah boss...thx...will do....
let's share the info leh..(though u r more pro lah..hehe)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Bump TopicReply to this topicTopic OptionsStart new topic
 



----debug section please ignore----
Lo-Fi Version Time is now: 23rd November 2009 - 07:29 PM
All Rights Reserved 2003-2009 Vijandren Ramadass (~living on a prayer~)