[Samba] samba file locking

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Feb 19 10:08:57 MST 2010

On Fri, Feb 19, 2010 at 07:33:48AM +0100, Janez Kosmrlj wrote:
> 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).

Can you try to mount with -o directio? Not sure this will
help, but it might be worth a try.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba/attachments/20100219/734a3fd4/attachment.pgp>

More information about the samba mailing list