DISK QUOTA HELP AND SOME PROBLEMS I ENCOUNTERED
God
root%bostonu.csnet at csnet-relay.arpa
Fri Nov 30 05:43:04 AEST 1984
> We are planning to use disk quotas to limit some of our wasteful users. I
> need some help setting the quotas up. I would appreciaty help from anyone
> who has experience setting up quotas on a BSD 4.2 System.
> Thanks,
> Mark Verber
> Ohio State University
Mark et al,
We use disk quotas on our teaching vax mainly cause it's embarrassing
for a student to find out that s/he just disrupted the system with
a runaway program. (In fact they are using now about 10% of the total
disk space so that is not the problem.)
Considerations:
1. Gotta figure out what people need in their primary area
to set the numbers. If you are lucky you can guess high
and adjust later.
2. Things like spool areas and tmp(s) are harder to
configure if you need to quotize those. The mail
spool is a particular nuisance as other users can
force someone over quota by blasting mail at them.
I haven't had it happen here but I would assume that
mail starts falling off the floor. My scheme is to
set the soft limit on /usr very high and the hard
limit low thus giving the user a chance to undo any
damage. Note that the saving here is that they can
always log on (3 times) before that gets disrupted.
For now I just don't use quotas on /tmp, I will resist
that although it could be done.
Problem areas:
The documentation on edquota is completely obscure and there are
no examples. I had to read the source to figure out what it wanted.
Here is a typical user's quota entry directly from an edquota session
for you to use as an example:
fs /usr blocks (soft = 2000, hard = 100) inodes (soft = 100, hard = 50)
fs /usr1 blocks (soft = 1, hard = 1) inodes (soft = 1, hard = 1)
fs /usr2 blocks (soft = 2250, hard = 2000) inodes (soft = 225, hard = 200)
fs /usr3 blocks (soft = 1, hard = 1) inodes (soft = 1, hard = 1)
Note that the user's home is on /usr2.
I found no way to set the limits on a quotized disk so the quota
system prevents them from creating any disk usage.
'0' means infinite (I think it shoulda been -1 and let 0 mean 0!!)
DONT TRY TO SET RIDICULOUS VALUES LIKE 0,-1 IN AN ATTEMPT TO
STOP DISK ACCESS...IT CAN CRASH THE SYSTEM INSTANTLY!!!
(I was lucky enough to be able to set this all up on a new
machine standalone.)
Other than that, it seems to work as advertised. Have faith.
Hints:
The 'edquota -p proto user...' is exactly what one
wants. For a course I set up a dummy account with
the course name and give it the quotas the students
in that course ought to have. To create a student I
then only have to 'edquota -p cs392 newstudent...'
(while I'm at it I put a .login, .cshrc etc in that
dummy acct to use from a shell script, also it becomes
the accounting group with UID==PID as a hook.)
Problem with Hint:
Sometimes (often) the 'edquota -p ...' doesn't take
(as printed by quota -v) ! It has to be run repeatedly
as it starts adding 1 disk on each run. I don't know
if this is a bug in edquota or quota -v or a synchrony
problem or what. Seems to be more reliable if more than
one acct on the cmd line. Any ideas???
-Barry Shein, Boston University
More information about the Comp.unix.wizards
mailing list