needs help with Quota on different shares

David Lee T.D.Lee at durham.ac.uk
Fri Nov 5 14:03:27 GMT 1999


On Fri, 5 Nov 1999, Sarabjit Singh wrote:

>  We have about 13000 students accessing their home directories on a
> Solaris7 server, which is running samba-2.0.4b on it.  We use NT
> workstations for them to access their home drives. Some of the students
> are in projects so they are mapped to another share on the same server.
> Each user has 6 M quota for the file storage on their homedrive share. 
> 
> Problem:-- Is there any way that we can allocate quotas to different
> shares I mean If a student has 2 shares one 'home' dir and other
> 'Project1' share on the same server and the user has 6M quota. Can we
> say somehow that the user have 3M (out of 6M)  for his home share and 3M
> for his Project1 share through smb.conf

The features of quotas are governed totally by UNIX, not by Samba or
shares (or any other such "client"). 

quotas work on the basis of a UNIX partition (i.e. mounted filesystem). 
To achieve a "quota-per-share" model, ensure that the shares for the user
are on different partitions.  That is, in UNIX a user gets one quota per
partition.  So if the user has different directories, but on the same
partition, only one quota is possible.  (Conversely, if his/her
directories are on different partitions, there have to be two separate
quotas; there cannot be one aggregate.)

So initially forget about Samba, shares, PCs etc.  Work out your quota
mechanism for a solely UNIX context.  When (not before) that is done, then
map the Samba stuff onto this.  (And "smb.conf" doesn't come into this at
all.)

To assist your users, by the way, configure your samba "--with-quotas": 
that way, the "Properties" of the drive will derive the filespace
attributes from quotas, not from "df".  Actually that raises another
question about whether this ought to be settable per-share, rather than
just the current sledgehammer "per compilation".  But I digress... 

Hope that helps (and hope I got it right!).


-- 

:  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