I've got a requirement to manage filer quotas from a home grown admin application. The basic functionality would be:
1) read user quota for user X 2) read group quota for group Y 3) set user quota for user X 4) set group quota for group Y
1) and 2) can be accomplished fairly easily via SNMP, however 3) and 4) do not appear to be as straightforward.
Having read the quotas chapter in the storage admin guide it appears the only way to control quotas is via the /etc/quotas file. This means that whenever a quota changes (which I'd expect to occur several times a day) I need to re-write /etc/quotas and do a quota re-size or re-build.
Is there no more elegant way of doing this - via SNMP perhaps?
-Ronan
I've got a requirement to manage filer quotas from a home grown admin application. The basic functionality would be:
read user quota for user X
read group quota for group Y
set user quota for user X
set group quota for group Y
and 2) can be accomplished fairly easily via SNMP, however 3)
and 4) do not appear to be as straightforward.
Having read the quotas chapter in the storage admin guide it appears the only way to control quotas is via the /etc/quotas file. This means that whenever a quota changes (which I'd expect to occur several times a day) I need to re-write /etc/quotas and do a quota re-size or re-build.
Is there no more elegant way of doing this - via SNMP perhaps?
You are stuck with editing the quotas file. You probably found out from the manual that netapp quotas are very complex, so that is why quotas are specified in a file.
There is no way to set a single quota for a user or group on a netapp (unless you have a single volume with no qtrees in it). Each volume and qtree has its own user and group quotas, so one user can potentially have hundreds of different quotas. Fortunately the quotas file allows you to set default quotas, so you do not explicitly specify all of these quotas in practice.
Steve Losen scl@virginia.edu phone: 434-924-0640
University of Virginia ITC Unix Support
On Thu, Jun 01, 2006 at 11:27:36AM +0100, Ronan Mullally wrote:
Having read the quotas chapter in the storage admin guide it appears the only way to control quotas is via the /etc/quotas file. This means that whenever a quota changes (which I'd expect to occur several times a day) I need to re-write /etc/quotas and do a quota re-size or re-build.
I wish quotas could be read from LDAP. If not found, default applied. So easy to manage. :)
p.
To the best of my knowledge no. Since the quota file is used at boot time (specificly when quotas are enabled) to set the limits, that's where you need to do the work.
I do have a question about changing quotas all that often, if the quotas are properly set, users should not be bumping into them all that offten, nad if they do bump onto them, perhaps thay need to clean up a bit? With 5000 odd users (and some of them are very odd) we find that we need to change quotas perhaps once or twice a month if that often.
<scw>
On Thu, Jun 01, 2006 at 11:27:36AM +0100, Ronan Mullally wrote:
I've got a requirement to manage filer quotas from a home grown admin application. The basic functionality would be:
read user quota for user X
read group quota for group Y
set user quota for user X
set group quota for group Y
and 2) can be accomplished fairly easily via SNMP, however 3)
and 4) do not appear to be as straightforward.
Having read the quotas chapter in the storage admin guide it appears the only way to control quotas is via the /etc/quotas file. This means that whenever a quota changes (which I'd expect to occur several times a day) I need to re-write /etc/quotas and do a quota re-size or re-build.
Is there no more elegant way of doing this - via SNMP perhaps?
-Ronan
On Thu, 1 Jun 2006, Stephen C Woods wrote:
I do have a question about changing quotas all that often, if the quotas are properly set, users should not be bumping into them all that offten, nad if they do bump onto them, perhaps thay need to clean up a bit? With 5000 odd users (and some of them are very odd) we find that we need to change quotas perhaps once or twice a month if that often.
It's not so much a question of users bumping into quotas as a very dynamic set of users - n x 10^6 in n x 10^3 groups - as users are added to / removed from or change between groups the group quotas will need to be updated.
-Ronan
On Thu, 1 Jun 2006, Stephen C Woods wrote:
I do have a question about changing quotas all that often, if the quotas are properly set, users should not be bumping into them all that offten, nad if they do bump onto them, perhaps thay need to clean up a bit? With 5000 odd users (and some of them are very odd) we find that we need to change quotas perhaps once or twice a month if that often.
It's not so much a question of users bumping into quotas as a very dynamic set of users - n x 10^6 in n x 10^3 groups - as users are added to / removed from or change between groups the group quotas will need to be updated.
I don't think you understand how group quotas work. They are not affected by moving users between groups. In other words, setting a group quota does not limit the disk usage of users who are members of that group. A group quota limits the disk space used by files and directories that have a particular group id. For example, if you have a file whose group id is G and you want to enlarge the file, you will be limited by the group quota for G. You will also be limited by the user quota for the user that owns the file. The smaller limit wins.
Group quotas have very limited usefulness, if any at all.
You probably need to use tree quotas to get what you want.
Steve Losen scl@virginia.edu phone: 434-924-0640
University of Virginia ITC Unix Support