mount points / free disk space / dfree command

David Lee t.d.lee at
Mon Feb 24 13:05:57 GMT 2003

On Thu, 20 Feb 2003, Panko, Kevin wrote:

> We have a share with mount points beneath it.  Free disk space is incorrect
> because samba always returns the free space in the top level directory of
> the share.  It is the same problem discussed before in this thread:
> d4d&
> I was hoping to use the dfree command smb.conf option, as the "df" command
> reports the correct amount of free space for each subdirectory.  I found
> that my dfree command was always given the directory name of the top level
> of the share, regardless of the current directory on the Win2k client, so
> the answer I get with dfree is the same as the internal samba routines.
> Why does that happen?  Does the QUERY_FS_INFO trans2 call have knowledge of
> the current directory of the client, or is that not included in the client's
> request?  If not, then I must admit that this may be impossible.  If it
> does, and if that
> directory were passed to the df command, then what I need can be done via
> samba.

This raises a slightly wider question, of which yours is one case.

Another case, already handled, is when the samba server (typically UNIX)
has user quotas.  Samba's behaviour is to let any individual user-quota
override its normal "df-for-whole-volume" behaviour.

Also the "smb.conf" file does allow an alternative command to be specified
and run.  (This might be an immediate way for you to address your
particular issue, although I get the feeling, possibly wrongly, that this
option might be regarded in the as "try to avoid if reasonably possible"
or "at your own risk" etc.)

Now pulling all that together and looking at the wider question...

I wonder whether there is a case for reshaping this functionality into
VFS modules in the VFS stack?  The default would still be "df" behaviour,
but there might be a VFS/quota module, which could act as a model for
other free-space modules.


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

More information about the samba-technical mailing list