linux (but not samba) quotas

David Lee T.D.Lee at durham.ac.uk
Thu Mar 29 15:55:03 GMT 2001


On Wed, 28 Mar 2001, Jim McDonough wrote:

> While I happen to agree with this point (this is not my problem, but a that
> of a customer of ours), try telling a paranoid business to configure their
> system with an option that reads:
> "--with-quotas     Include experimental disk-quota support".
> That word "experimental" doesn't sit well with a lot of folks.  If it so
> safe, why is the word "experimental" still in there? And how safe is it on
> 2.0.7?

Thanks for the reply.

Under one interpretation of "experimental", the whole of samba was, is
now, and forever shall be, "experimental".  But I think we can dismiss
that interpretation in this quota discussion. 

My guess is that the "experimental" tag is, by now, simply historical
baggage which hasn't been spring-cleaned.  In the early days, it was,
doubtless, "experimental" in that toe-in-the-water sense. 

Our own involvement with Samba is just about two years.  And it was quite
early on that I discovered, to great relief, the "--with-quotas" option.
It has been of vital and central importance to us: Solaris with both UFS
and VxFS filesystems.  Indeed, when we found there wasn't a VxFS version,
we added it ourselves (with informal support from Veritas) and submitted
it back to the samba project. 

My own view is that the "--with-quotas" option should now be mainstream,
not "experimental".  It also would be far better 'public relations' (your
point, Jim) for this aspect which has had a decent amount of real-world
exposure. 

I would go a step further and suggest that it be the default.  Let me
eliminate possible objections (divide and conquer):

1.  Experimental:  I suspect that most of those sites that use it have
    found it to work satisfactorily.  It is tried, tested and proven,
    both conceptually and in the real, implemented cases. 

2.  "My OS doesn't have a quotas concept.":  Fine.  In that case autoconf
    and configure will determine its absence, and arrange for a null 
    routine to be compiled or similar.  Any failure here is in
    configure.in, not in the quota support.  I think there is a 
    "noquotas.c" arrangement already in place for this.

3.  "My site doesn't use quotas":  Fine.  Samba's call to quotactl() or
    equivalent will report this, and samba then returns df-like figures.
    (It is a tiny bit of overhead on relatively infrequent occasions.) 

4.  "My OS is not a mainstream one":  In that case there will be much else
    in autoconf and configure that needs attention; quota-detection is
    just one of them (and relatively minor, given that there is a bypass
    route already).
    

Your question:
   How safe is it on 2.0.7 ?

Well, based on a sample size of 1 ...

We run samba 2.0.7 (and have run its predecessors for nearly two years) on
several fileservers on a mix of Solaris versions, and a mix of UFS and
VxFS filesystems, some quota'd, some not.  Our main fileserver has 700 or
so simultaneous connections, all including a quota'd home directory.  It
works fine.

Problems?

1.  There was no Solaris/VxFS support.  But it still reported "df" fine. 
    We wanted Solaris/VxFS, we must have been among the early such sites,
    so we added it.  

2.  Very occasionally a user has reported that it shows "df"-like figures.
    On all such (rare) instances, this has been traced to either the
    quotas being off (at the UNIX "quotaon/quotaoff" level) or to some
    problem in the UNIX quota for that user.  That is, to UNIX quota
    problems, not samba ones.

Like any code, there may still be residual bugs.

But my votes would be:
1.  Drop the word experimental.
2.  Go a step further and make "--with-quotas" the default.  


> But here's another twist....put the single file copy aside.  If I have an
> NT server with 15 megs free on a shared folder, and I initiate a 10 meg
> copy, it will start to process.  While the copy is proceeding, I start
> another 10 meg copy on the same share.  No quotas involved, just pure disk
> space.  The NT server will fail the second copy because of lack of space.
> The samba server will allow the copy to proceed until space is exhausted.
> You are then left with one (or two) files which are incomplete, and the
> file size reported by ls is not the same as the contents.  How should samba
> deal with this?  If quota support is enabled, but no quota limits are hit
> by the copy, what happens?

I think, under those circumstances, that the "If quota support is enabled" 
aspect becomes irrelevant.  That is, that the behaviour (whatever that may
be) is unaffected by whether quota support is enabled or not.  I think... 

Hope that helps.

-- 

:  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.                  :





More information about the samba-technical mailing list