Is there *any* way (and I'm open to any suggestions) to get around the inability of 'quota resize' to handle additions/deletions from the /etc/quotas file ?
The problem I'm stuck with is trying to provide realtime addition of users (with quotas) on a 100GB filer without having to turn quotas off and on, which is currently a 26 minute process. During these 26 minues, no quotas are enforced. Acceptable once a night, but not as often as they want me to run it.
A few of ideas (in order of ascending lunacy):
- just accept the fact that NetApp doesn't consider this wish to very important and turn the quotas on/off as often as is feasible.
- set a default quota for the export, and just create a new quotas file once per night.
- preload the /etc/quotas file with entries for all possible UIDs, then just change the quota as they request it. This way the /etc/quotas will always be the same length and contain the same number of users.
- get NetApp to allow an SNMP SET request to implement this functionality
- try to figure out the format of /etc/db/quota.db and manipulate it directly.
- kidnap Dave Hitz (presuming he's still there) and have him add the feature at gunpoint.
- Quit.
TIA.
Is there *any* way (and I'm open to any suggestions) to get around the inability of 'quota resize' to handle additions/deletions from the /etc/quotas file ?
Here's something that *should* work, but I haven't actually tried it.
(1) Create a default quota on the FS in question.
(2) Create a home directory for your new user -- jsmith. (There should now be a default quota for jsmith.)
(3) Add a new entry in /etc/quotas for jsmith.
(4) Run 'quota resize'.
The reason this should work is that quota resize does not rescan the filesystem to build new quotas from scratch, but it should hijack (and update) an existing quota, whether that quota came from a default or from a specific user quota.
Note that you must create jsmith's directory before you add jsmith to /etc/quotas and run 'quota resize'. Otherwise, there won't already be a default-created entry for jsmith, and quota resize won't find any existing quota to attach the new jsmith quota to.
If this doesn't work, then tell them I said it was a bug...
- kidnap Dave Hitz (presuming he's still there) and have him add the
feature at gunpoint.
Dave who? I haven't seen anyone around who looks like he needs kidnapping...
Dave
On Mon, 22 Jun 1998, Dave Hitz wrote:
Is there *any* way (and I'm open to any suggestions) to get around the inability of 'quota resize' to handle additions/deletions from the /etc/quotas file ?
Here's something that *should* work, but I haven't actually tried it.
(1) Create a default quota on the FS in question. (2) Create a home directory for your new user -- jsmith.
(There should now be a default quota for jsmith.)
(3) Add a new entry in /etc/quotas for jsmith. (4) Run 'quota resize'.
The reason this should work is that quota resize does not rescan the filesystem to build new quotas from scratch, but it should hijack (and update) an existing quota, whether that quota came from a default or from a specific user quota.
Note that you must create jsmith's directory before you add jsmith to /etc/quotas and run 'quota resize'. Otherwise, there won't already be a default-created entry for jsmith, and quota resize won't find any existing quota to attach the new jsmith quota to.
I forgot to write back about this, but just to confirm: this works perfectly. The only problem is the user whose quota is set before any files on the quota tree are owned by their UID. This is easy enough to solve if your user account creation software creates the userdirectory before it issues the quota resize.
On Mon, 22 Jun 1998, James FitzGibbon wrote:
- preload the /etc/quotas file with entries for all possible UIDs,
then just change the quota as they request it. This way the /etc/quotas will always be the same length and contain the same number of users.
This worked nicely for me... just run a quick script to touch/chown a bunch of files, quota on/off once, and you're set. I preload a few thousand uid's at a time on the Netapps here that provide virtual mail and web hosting, then have a script that generates filer /etc/passwd files so that "quota report" shows domain names in the username field.
The fact that this has to be done this way is a travesty.
On Mon, 22 Jun 1998, Brian Tao wrote:
On Mon, 22 Jun 1998, James FitzGibbon wrote:
- preload the /etc/quotas file with entries for all possible UIDs,
then just change the quota as they request it. This way the /etc/quotas will always be the same length and contain the same number of users.
This worked nicely for me... just run a quick script to
touch/chown a bunch of files, quota on/off once, and you're set. I preload a few thousand uid's at a time on the Netapps here that provide virtual mail and web hosting, then have a script that generates filer /etc/passwd files so that "quota report" shows domain names in the username field. -- Brian Tao (BT300, taob@risc.org) "Though this be madness, yet there is method in't"