Click to See Complete Forum and Search --> : setting user disk quotas in rh 7.1??


s3nsai
07-26-2001, 01:13 PM
does anyone know how to set user disk quotas in redhat 7.1 linux.. if so could you give me a step by step or give me a link on how to do it...thank


sensai

s3nsai
07-26-2001, 01:21 PM
please anyone

hux
07-26-2001, 01:24 PM
i *think I can*...heh...when you boot now, are you seeing a line in the interactive setup that says "activating user quotas"?

Need to know that first.

There is a NHF, but it didn't help me much, I think something changed with 7.1.

s3nsai
07-26-2001, 01:40 PM
yes that comes up during setup.... the quotas do initalize in when booting..

[ 26 July 2001: Message edited by: s3nsai ]

hux
07-26-2001, 01:59 PM
ok....try this as root:

repquota -a

might hafta type the path, like so:

/usr/bin/repquota -a

go ahead and create a user to test with, if ya aint got one already

if the above doesn't give you a list of the system users lemme know..

hux
07-26-2001, 02:03 PM
if it does, and I remember right, you need to do this:

export EDITOR=pico

that command tells yer system to use pico to edit this quota, as opposed to vi...then:

/usr/sbin/edquota -u username

you need edit this file to set a soft limit, and a hard limit as a minimum...it's in kilobytes if I remember right, so 100 megs=100000...

when you've made yer changes, hit um...ctrl-x, tell it yes to save changes, it's gonna tell ya it's saving it as a *.tmp file, that's fine...after you do that, do the repquota command again, it should reflect the changes...

if you get something about a quota file missing, lemme know.

s3nsai
07-26-2001, 02:10 PM
ok when i open the file i get this


Edit block adn inode quota for user cryptix:


where do i enter in the softblock and hardblock info.. just type it in????

if you could can you give me an example on how it should look thanks

hux
07-26-2001, 02:18 PM
eh...2 lines below that, where it should say soft=somenumber hard=somenumber

not the last line, that's defining it by blocks, which is not the same...should be the third line down...

edit "somenumber" to be what you want their new quotas to be...shouldn't be the same, hard should be slightly higher than soft..if ya dont know the difference lemme know I'll go through it with ya, no shame in it.


edit block and inode quota....
device /dev/hdxx (/partitionname)
# this next line is where you wanna edit
used xxk, limits: soft=x hard =x
Used 24 inodes, limits: soft=0 hard=0

s3nsai
07-26-2001, 02:23 PM
first off thanks hex for all your help:


second i guess i did somethign wrong cuz i only have that one like when i run the /usr/sbin/edquota command... so did i mess up something or did they change something in 7.1??? i also know the differance between the hard and soft thannk for the offer anyway.. any suggestion on why i only have one line... and what do i need to do now since i only have one line???? i only have the quotaon set for one partition as a test which is the /home partition... does that have something effecting why i only have one line which is

Edit clock and inode quota for user cryptix:


thanks man

hux
07-26-2001, 02:28 PM
you did do the export EDITOR=pico command, right? If ya did, no, I'm sorry, I have no idea..if you didn't, try it and see if it makes a difference.

hux
07-26-2001, 02:30 PM
also, have a look in /home and see if you have a file named quota.user or some such..if not you'll hafta do a touch quota.user command, can't remember the syntax specifically, it is in the NHF file, and accurate if I remember correctly..that part, anyways..

s3nsai
07-26-2001, 02:34 PM
naw i didnt have a quota.user so i did a touch quota.user and .group and it created the file there...but i still have the same one line do i need to reboot ?

hux
07-26-2001, 03:12 PM
I *think so* man, but I can't remember to be honest with ya...try it, we're gonna have a look in your /fstab afterwards...

s3nsai
07-26-2001, 03:31 PM
ok rebooted.. still one line.. oh well... whats next ????

hux
07-26-2001, 03:40 PM
ok....:

pico /etc/fstab

BE CAREFUL IN HERE, ONE MISTAKE AND YOU'VE LOST YER PARTITIONS TABLE...

yer lookin for the line that has /home in it...:

LABEL=/home /home(something like that) ext2 exec,dev,usrquota 1 1

do you see the usrquota switch there?

if not, and I'm a little shaky here, yer gonna hafta add it on that line...refer to the NHF...make a backup of the file first, and be prepared to boot off an emergency floppy...I'm serious dude, you can screw up yer system in a hurry here.

alternatively, you can go into linuxconf and follow the instructions to enable quotas on the /home partition..that works ok I think..

lemme know, I'm doing this from memory...guys, little help here?

s3nsai
07-26-2001, 03:45 PM
ok going to try it out now....

s3nsai
07-26-2001, 06:24 PM
it worked.. thanks to all for your help