[Samba] Free space calculation gets it wrong

Thomas M. Skeren III tms3 at fskklaw.com
Wed Jan 19 13:03:08 GMT 2005


Alexander Skwar wrote:

>Hello!
>
>Running Samba 3.x on HP-UX 11.00, Linux and Solaris.
>
>I've got a problem with the free space calculation of Samba. The problem
>is, that Samba only seems to return the free space available in the top
>directory of a share and not the free space available in the current
>directory. That's a problem for me, since I share a directory on the
>server and then mount the actual "stuff" into it.
>
>Let me give you an example:
>
>I shared the directory "/Shares" on "server" with the name "Shares".
>The directory /Shares is on / on the server.
>In "/Shares", there's the directory "CAD". This directory is a seperate
>file system.
>Now I start the Windows Explorer (from Windows XP) and go to
>\\server\Shares\CAD. The free space available is the same as
>shown in \\server\Shares - IOW: it shows the free space from
>/, and not from /Shares/CAD
>
>Directory	Mountpoint	Free space
>/Shares		/		20MiB
>/Shares/CAD	/Shares/CAD	40GiB
>
>Going to \\server\Shares\CAD shows me that 20MiB is available and not,
>as wanted, 40GiB.
>
>What do I have to do, to make Samba return the free space in the
>current directory and not from the top most directory of the share?
>
>First, I thought to write a script which I hook into the "dfree command"
>option of Samba. But sadly this did not work :( Just like the man page
>says, the script is only given "./" as the first (and only) parameter.
>I also did not see anything of interest in the environment (as
>printed by the "env" command). I don't quite see how to get to what
>directory "./" (the current directory) is referring.
>
>Do you have any clues on how to solve that problem?
>
>BTW: Also sharing /Shares/CAD is not a solution I'm after :)
>  
>
Probably the only way you will get what you want.  I don't think Windows 
can understand how a directory on a "drive" can be larger than the 
"drive" itself.

>Thanks a lot,
>
>Alexander Skwar
>  
>




More information about the samba mailing list