[CentOS] samba file locking

Fri Sep 25 15:24:01 UTC 2009
m.roth at 5-cent.us <m.roth at 5-cent.us>

> Hi,
>
> On Fri, Sep 25, 2009 at 08:07, janezkosmr <janezkosmr at volja.net> wrote:
>> I encountered an interesting problem. We have a Java application on a
>> samba server. The folder is then shared to the clients via a samba
<snip>
>> When a developer copies a new jar to the folder which is shared via
>> samba. And if this copying is done by scp strange things start
>> happening. After a few clicks the application stops working returning
>> NoClassDeffFound, even if the file is there and readable. After that it
<snip>
> I believe the problem is that you are rewriting the file on the server
> (with "scp") while it is open on the clients (using NFS? or mounted
> CIFS?). As the clients have the file open they will have parts of it
> cached, and those parts will be updated on the server but the cache
> will persist on the client for sometimes quite a long time, or until
> you unmount the network filesystem, which it seems is what you are
> currently doing to fix the issue.
>
> I would suggest that you change the procedure to update the .jar file.
<snip>
You're on linux. I'd agree with changing the procedure, but to
scp <filename.datetimestamp>
ln -s <filename.datetimestamp> <filename>

      mark