[Samba] Issues with Samba file sharing
lakshmanb at gmail.com
Wed Nov 24 04:31:38 GMT 2004
I use redhat Linux + samba server to share the files in windows for
playing some *.wma *.rm etc..which is updated quite often.
When I upload a new wma/rm file to the existing file (ie overwrite the
file in the NAS) the WM server won't update the file if people are
already listening to the file being updated connected via WM client.
It will continue to play the old file than to play the new file which
was being updated.
Note: When I use "cp" command and update the file in linux on the NAS
server and the new file is getting played. If we use "mv" the old
continues to play by the player which it was already playing as it
should play the new one.
I had tried different options for Disabling / enabling Opportunistic
Locking in both Windows and samba. None of them seem to work.
Can anyone shed some light on this as how to go about fixing the problem.
>From this what I suspect is that the inode of the file and not the
file which is getting cached and so it is accessing the same old file.
This may error out when the file size is big. The players may not have
the full bunch of inode info of the old file. So when it refers for
the rest of the info, it errors out as it got changed totally after
the "mv". But "cp" will be overwriting the old inode locations with
the new file content and so even the cached inode location will have
the new content and so the client will get the updated file.
As per my findings there are workarounds to lock the file against
writing or oplock the file against caching. But I am not able to find
any workaround to disable inode caching. Also please correct me if I
have mistaken that the problem is with the inode cachind.
Thanks in advance.
More information about the samba