| > 1. Our customer want to limit file quota for 20,000 users respectively.
> If using command(edquota), too long, and boredom
> Is there anybody who knows shell script instead of command?
I don't know about a script, but you could begin by writing a program
to call quotactl() (man 2 quotactl) to set the initial values. Do a
little experimentation with the system call, then write a little
utility. You could then write a script to call the utility passing in
the name of each user and the file system to be initialized.
It is just a thought.
Bob Harris
PS. While the man page for quotactl() says that this is for UFS file
systems, AdvFS does have code to implement quotactl() as far back
as v3.2c and I've tested it on v4.0 and it does work. So if you
are running on a v3.2* version, try it, it will most likely work.
|
| You wrote:
If soft limit exceed 2000, what happen?
I'm not sure what you mean. Do you mean "What happens if the user exceeds
2000 (blocks/files)?" In that case, he will be warned that he has exceeded
his soft limit but he can still create/update files until he hits his hard
limit. Once he's at his hard limit, he cannot do any more file creations/
expansions. The grace period is the amount of time until the soft limit
starts
to behave like a hard limit. That is, if you set the soft limit to 1000 files
the hard limit to 2000 files, and the grace period to 2 days, the user can
continue to have more than 1000 files but less than 2000 files for up to two
days. After two days, the soft limit will start to act like a hard limit and
the user will not be able to create new files. He will have to delete files
until he is under 1000 before he can create new ones.
[Posted by WWW Notes gateway]
|