[Samba] Samba quotas

David Lee t.d.lee at durham.ac.uk
Thu Jan 31 03:59:03 GMT 2002


Re:

> Date: Wed, 30 Jan 2002 15:07:54 -0800 (PST)
> From: Stephen Carville <stephen at totalflood.com>
> To: Samba List <samba at lists.samba.org>
> Subject: [Samba] Samba quotas
> 
> I want to set up quotas for shared directories but I'm not clear on
> what is needed.  I have a large RAID5 partiton with four directories
> that get exported.
> 
> /export/private = home directories
> /export/common
> /export/public/
> /export/netapps
> 
> Can samba set different quotas for the different directories?

I suspect there may be a conceptual mis-understanding here.  Samba, of
itself, deosn't have quotas, because, to the best of my knowledge, the SMB
protocol doesn't have a _separate_ "quota" concept.

Rather it is the _server_ (typically some flavour of UNIX) that has the
quotas.  All the details of quota-handling need to be regarded in a
UNIX/server context using whatever is appropriate for that server.  That
needs to be the frame of reference in one's mind: UNIX/server quotas
irrespective of any Samba. 

The SMB protocol has a concept to convey disk capacity and available
space, and it is this that Samba implements.  The default for samba (the
smbd daemon) is to use information about the UNIX/server partition/volume
itself:  analogous to UNIX "df" command. 

Now what Samba (i.e. the smbd daemon on the UNIX/server) can do, if the
"configure" is done "--with-quotas", is to look preferentially for
UNIX/server quotas, if present.  (If absent, it falls back to the usual
"df"-like figures.)

So:

1. temporarily forget about Samba;
2. become familiar with quotas on your UNIX/server box within itself;
3. then bring Samba back into the equation to make use of those quotas.

There are no "samba quotas"; rather samba is piggybacking on UNIX/server
quotas (if Samba has been so configured and if those UNIX/server quotas
are available to it).

In your case you have one partition with four exported subdirectories. 
Many (most? all?) UNIX/server quota schemes operate only at the partition
level, not at this sub-directory level.  That might be a fundamental
barrier to what you wish to achieve.  If it can't be done within your
particular UNIX/server, then samba won't be able to piggy-back on it.

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 mailing list