max size and quotas

David Lee T.D.Lee at durham.ac.uk
Fri Oct 22 10:01:21 GMT 1999


On Fri, 22 Oct 1999, Todd Pfaff wrote:

> On Fri, 22 Oct 1999, Peter J. Holzer wrote:
> 
> > [...]
> > Quotas are better.
> > 
> > BTW: Does anybody have a good idea to alert users once they exceed their
> > soft quotas? Right now I'm sending an email once per day, but I think
> > the warning should be more immediate unfortunately there doesn't seem to
> > be any non-polling way to detect this condition so the best thing I can
> > think of is calling repquota rather frequently (e.g. once per half-hour)
> > and notifying users via winpopup if they haven't already been notified.
> 
> i think this would be very useful if handled at a lower level within
> samba.
> 
> what i envision is that whenever an open, create, or write fails, the
> samba server could detect that the cause of the failure was a quota
> violation and then call an exception handler defined in smb.conf.
> the exception handler could call winpopup or whatever to alert the user.
> 
> does this sound doable?  would it require major changes to the guts of
> samba?

Quotas ("--with-quotas") are very important to us.  (Indeed, the samba
team have a patch from me to handle Veritas quotas, initially Solaris,
which they are considering.) 

I know nothing of CIFS (I just install and patch samba!), so have no idea
how easy/difficult Todd's suggestion might be.  But we, too, would like
some functionality to alert the user of quota-specific danger.

For instance, a few sketched ideas:

1. User hits hard limit: write etc. fails.  Inform that it is a quota
   problem (as distinct from a multitude of other possibilities).  My
   guess (and it is just a guess) is that this is part of the general
   case of wanting to return (or map) the UNIX "errno" through CIFS to the
   client (which CIFS may make trivial, impossible or somewhere between: I
   don't know).

2. User goes above soft limit (less than hard limit!): thus writes work
   but user is living dangerously.  Perhaps smbd could check periodically
   (e.g. every "n" writes or every "m" minutes) on soft limit and current
   usage and report (through CIFS, perhaps? see (1)) to the client.

Todd's proposed mechanism ("smb.conf" exception handler and popup) begins
to feel like approaching this from the wrong end, but that might just be
my lamentably poor understanding of samba and my even worse knowledge of
CIFS.

I eagerly support Todd's plea for attention in this area, though urging
caution so that we look at the bigger picture and a good, clean, general
implementation mechanism.

Does this sound OK, in principle, at least?

Obviously, samba evolves because folks like us have these ideas and are
prepared to devote our own effort into implementing them (we can't expect
Jeremy, Tridge et al to do all the work!).

If someone can point me to a description of CIFS, in particular those bits
which might define handling write errors, I'd be prepared at least to have
a first look at a possible implementation (subject to work pressures, of
course, which includes our Samba service). 

-- 

:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:  http://www.dur.ac.uk/~dcl0tdl            South Road            :
:                                           Durham                :
:  Phone: +44 191 374 2882                  U.K.                  :



More information about the samba-technical mailing list