Solaris NFS Quota

David Lee t.d.lee at
Thu Apr 24 10:02:00 GMT 2003

On Wed, 23 Apr 2003, Hazem Hamed wrote:

> I just upgraded from Samba 2.2.0 to Samba 2.2.8a on a Sun SPARC Solaris 8
> server. User quotas are enabled on the system.

Are you saying "It all used to work; the *only* change is a Samba upgrade
from 2.2.0 to 2.2.8a; it now doesn't work"?

Are you happy that the UNIX/Solaris command "quota -v" (no Samba
involvement) is actively reflecting changes to users' files?

> When mapping the user directories on Solaris as a network drive on Windows,
> the old Samba used to show the mapped drive size equal to the quota
> soft-limit. Now after the upgrade, the mapped drive information shows the
> total capacity of the NFS directory.

Wait a minute.  Why this mention of NFS?

If the disks are on this Solaris machine (also hosting Samba), then NFS is

Quotas are a feature of Solaris/OS for the disk.  It so happens that
quotas can be read, via RPC, in parallel to an NFS mount across Solaris/OS

But (regardless of quotas) running Samba on one machine (A) when the disks
are on another machine (B) might introduce locking problems;  it would be
wiser, if reasonably possible, to run Samba on the disk host.

But if this really is NFS (is it?) I believe that earlier versions of
Samba (including early 2.2.x?) did not have support for quotas (in
smbd/quotas.c) across an NFS link, but that later versions do.  However,
that goes the opposite way to the problem you describe!

The obvious thing that springs to mind is: did you "./configure" 2.2.8a
using the "--with-quotas" option?

> Is there an option that has to be enabled in smb.conf such that the Windows
> mounted drives will have a capacity equal to the assigned NFS quota?

Not that I know of.  (Why this mention of NFS again?)  As I understand it
Samba usually uses "df"-like figures, but "configure...--with-quotas"
instructs it to use quota-like figures where available.

Widening the topic, but drifting away from your immediate problem:  One of
the things I would very much like to see in Samba is to have this flexible
at run-time, rather than fossilised at configure time, and also allow
per-share specification.  This could easily be done with the new VFS
structure by moving the various "dfree" behaviours (default, quota-based,
"dfree command") into VFS modules.  How about it, folk?  Can we head that
way for "3.0"?  I'm happy to try to test the various 3.0alphaX in this


:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:            South Road            :
:                                           Durham                :
:  Phone: +44 191 334 2752                  U.K.                  :

More information about the samba-technical mailing list