mount points / free disk space / dfree command

Panko, Kevin kevin.panko at pw.utc.com
Tue Mar 4 16:04:31 GMT 2003


I went and read some of the CIFS spec[1], and it seems to me that the
QUERY_FS_INFO trans2 request only includes an identifier for the current
connection.  Given this information, samba can only attempt to determine the
amount of space on the root of the share.  This explains why using the dfree
command did not give me any different numbers than not using it.

If I really understand what is going on here, then what we would have to do
is create a new share for each mounted device.  That would be hard because
the root that is exported happens to be an automounter directory, which
changes.

[1] http://ubiqx.org/cifs/rfc-draft/draft-leach-cifs-v1-spec-02.html#s4.1.6

-----Original Message-----
From: Panko, Kevin [mailto:kevin.panko at pw.utc.com]
Sent: Thursday, February 20, 2003 3:27 PM
To: ''
Subject: mount points / free disk space / dfree command


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:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&th=4c04c4aeb2405
d4d&seekm=9q2iee%242s7r%241%40FreeBSD.csie.NCTU.edu.tw&frame=off

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

I do not want to use recursion and add up the amount of free space as the
sum of each mount point.  I only care about the current directory.

We do have a need to determine the amount of free space from Win2k, and
creating a samba share for each subdirectory would be impractical.

TIA,
Kevin Panko


More information about the samba-technical mailing list