[Samba] samba file locking
postnalista at googlemail.com
Thu Feb 18 23:33:48 MST 2010
Hi samba experts,
We have a strange file locking problem and i hope someone can help. We use
some CentOS 5 servers, which use samba 3.0.33, to share files of a java
application to clients. Clients are mostly CentOS 5 (same version as the
server), but there are a few legacy windows clients (the reason why we use
samba and not nfs). And now the problem. When our developer uploads a new
jar file to the server via scp (or via local cp command) we encountered a
problem. As soon as the server has the new file the Linux client (windows
not yet tested) is seeing a corrupt file. And this state continues until the
share gets remounted on the client. This was working before where we had a
fedora core 4 servers and only windows clients, but now we are in the
process of upgrading the servers and introducing Linux on the client side.
You can also simulate the problem if you open a text file on a Linux client
with tail -f and then change the file on the server locally. The file the
client sees is corrupted until the share gets remounted.
First thing. As these are remote locations and there is a lot of them, it is
not possible to upload files via smb (we would like to make rpm packages for
the application and the app will be distributed via yum).
We tried various permutations of the parameters kernel oplocks, posix locks,
oplocks, level2 oplocks, ... but nothing seems to work. We also tried to use
a newer samba version (3.4.5).
And now the question. Is there someone, that knows how this file locking
works and can giwe a suggestion what we are doing wrong.
More information about the samba