Mailing List Archive

quotas over limit: determination thereof
If what follows is in the manual or is a FAQ, then just point me in the
direction...

Executive summary: Is there an easy way (variant of "quota report"
perhaps?) to discover which users are over-quota?

Detail:

We are beginning to migrate our home directories (15K-20K of them) from
Solaris to NetApp. Quotas are a vital part of the control of these
directories.

Under Solaris (trad. UNIX), each user has an explicit quota. While this
is possible under NetApp, it seems far more sensible to use default quotas
where possible (and the documentation encourages this).

We have set up some reasonable default quotas, and are using rsync
(thanks, folk!) to get the user files prepared in the future NetApp
location: transferred (from 20+ volumes across three Solaris fileservers)
and kept in sync.

Naturally a few of our users have more data than our NetApp default
quotas. What we simply want to do is identify these exceptions so we can
apply explicit quotas. We will, if possible, adjust the defaults so that
the number of exceptions, from our 20K user-base, is reasonably small.

Under Solaris etc., the output from its "repquota" command was easily
eyeball-able (I know, no such word!) for such exceptions: "+" and expiry
times.

Is there a variant of NetApp's "quota report" that either restricts output
to over-quota users, or has a field indicating over-quota, or similar?

Or is the NetApp convention simply to cobble together a bit of awk/perl to
extract those lines (from the total 20K) in which "Used" exceeds "Limit"?

Thanks in advance.

--

: David Lee I.T. Service :
: Systems Programmer Computer Centre :
: University of Durham :
: http://www.dur.ac.uk/t.d.lee/ South Road :
: Durham :
: Phone: +44 191 374 2882 U.K. :
Re: quotas over limit: determination thereof [ In reply to ]
David Lee <t.d.lee@durham.ac.uk> writes:
>
> If what follows is in the manual or is a FAQ, then just point me in the
> direction...
>
> Executive summary: Is there an easy way (variant of "quota report"
> perhaps?) to discover which users are over-quota?

[& from later in your posting...]

> Under Solaris etc., the output from its "repquota" command was easily
> eyeball-able (I know, no such word!) for such exceptions: "+" and expiry
> times.
>
> Is there a variant of NetApp's "quota report" that either restricts output
> to over-quota users, or has a field indicating over-quota, or similar?

Not that I know of.

> Or is the NetApp convention simply to cobble together a bit of awk/perl to
> extract those lines (from the total 20K) in which "Used" exceeds "Limit"?

I would use an awk or Perl script as you suggest. It doesn't have to be
more than a one-liner:

rsh [filer] quota report | awk '($1=="user") && (($5>$6) || ($7>$8))'

> Detail:
>
> We are beginning to migrate our home directories (15K-20K of them) from
> Solaris to NetApp. Quotas are a vital part of the control of these
> directories.

If you already have Solaris ufs quotas, why don't you use them to set
the NetApp ones, at least as a guideline? Usage won't be quite the same:
it goes up because the NetApp 4K allocation unit is larger than the 1K
fragment size on Solaris, and down because space occupied by directories
isn't accounted, but a 10% increase (say) would cover most cases.

> Under Solaris (trad. UNIX), each user has an explicit quota. While this
> is possible under NetApp, it seems far more sensible to use default quotas
> where possible (and the documentation encourages this).

It's true that using default quotas like that saves some overhead, but
nowadays it isn't all that significant. I use a default user quota of zero,
to be applied to uids that shouldn't have files in the home directory qtree
at all, and to cancelled users (we have a delay between cancelling a user
and removing their files, so that un-cancellation is easy). All the "real"
users have an explicit quota set in /etc/quotas, even though over 90% of
them have the same limits. Still, it sounds as though you have 3-4 times
as many users, so YMMV.

> We have set up some reasonable default quotas, and are using rsync
> (thanks, folk!) to get the user files prepared in the future NetApp
> location: transferred (from 20+ volumes across three Solaris fileservers)
> and kept in sync.

Ugh... I remember having to transfer the contents of 8 home partitions
spread across (guess!) three SunOS 4.1.3 servers to an FAServer 450
back in August 1995. Welcome to the club...

> Naturally a few of our users have more data than our NetApp default
> quotas. What we simply want to do is identify these exceptions so we can
> apply explicit quotas. We will, if possible, adjust the defaults so that
> the number of exceptions, from our 20K user-base, is reasonably small.

Hmmm... you do realise that this is giving to the rich (or the extravagant,
anyway), at the expense of the poor (or frugal)? :-)

Chris Thompson University of Cambridge Computing Service,
Email: cet1@ucs.cam.ac.uk New Museums Site, Cambridge CB2 3QH,
Phone: +44 1223 334715 United Kingdom.