- Run a samba share on some arbitrary linux directory e.g. /media - Access the share with e.g. smbclient - Now mount an additional device, e.g. /media/usbdisk - Enter /media/usbdisk with the above SMB/CIFS client - See the number of available blocks. It will correspond to the free block count on the orginal device (the one where /media resides), not the one corresponding to the present device. Theres quite a number of software on windows clients which relies on correct numbers here, and will refuse to work if the disk space reported does not match neither expectations nor reality. I suppose the number remains cached somewhere in smbd. Should be determined via statfs() upon request instead.
No, I'm afraid this isn't smbd, this is how UNIX works. If you do a statfs on /media, you get the free space on media - not including any mounted filesystems below it. If you want the free space on /media/usbstick you have to do a statfs on that pathname. You need to use a dfree script that will aggregate free space on a pathname in order to make this work. This is left as an exercise for the submitter :-). This isn't a Samba bug. Jeremy.