[Samba] Linux -> Windows Server2003 Leaves Open Files...

Russell Leighton rleighton at imake.com
Tue Apr 4 02:45:31 GMT 2006


Solution: don't  mount as 'smbfs' instead use 'cifs'.

Russell Leighton wrote:

>
> I was hoping the Samba experts on this list can help me with an 
> irritating issue...
>
> I have an issue with Windows file servers (Server2003) thinking that 
> files are open with they are not.
>
> The problem occurs when one or more linux servers using smbfs mounts 
> under FedoraCore4 opens the same file(s) at the same time.
> This test script can exhibit the issue:
>
>     # CAREFUL to kill this after a few seconds!!!!
>    while true; do  head -1
>    /mnt/windows-server/TestMount/euro_prod/a*/*/*.xml > /dev/null & done
>
>
> Once these processes complete an 'lsof' shows that the linux machines 
> have no open files but an 'net file' on the windows server shows these 
> files are open.
>
> The only way to fix this is to 'umount /mnt/windows-server' . After 
> that a 'net file' shows all the files closed.
>
> I have repeated the above issue on 2 different windows file servers.
>
> This is an important issue, as we have an app we want to migrate to 
> linux but we must (in the short term) continue to use a windows file 
> server.
> This app forks a few processes that access the same files on the 
> windows file share. After running a big job the windows server thinks 
> files are open.
>
> These open files prevent other windows programs from opening the file 
> and are generally a nuisance.
>
> I am not sure if this is a windows or linux issue.
>
> Any help would be appreciated.
>
> Thx in advance.
>
> Russ



More information about the samba mailing list