Samba locking problem

orobitai at orobitai at
Tue Jun 5 21:56:05 GMT 2001

hello all,
I have a problem that involves samba's locking mechanism, and from what I
could see I'm not the only one. I quoted this from a newsgroup because his
situation was very similar to my own.It involves using samba severs as
gateways to access the main file server.
Here goes:
BNFL BNFL <ap05 at> writes:

>I have an interesting problem with Samba, of which I'm trying to find a
solution to.
>I have tried to illustrate this with the following diagram :-
>  ----------------    ----------------            ----------------
>   |nt workstation 1|  |nt workstation 3|          |nt workstation 2|  |nt
workstation >4|
>    ----------------    ----------------            ----------------    >
>*connects        |                |                     |                |
*connects to
> to esu064         |              |                       |             |
esu070 in >the
> in the format       |            |                         |          |
>\\qsautocad\<share>   |           |                           |       |  >
>                     ---------------
>                    |samba gateway 1|                      |samba gateway
>                    |     (esu064)  |                      |   (esu070)
>                     ---------------
>                             |                              |
>                              |  *NFS Connection           |   *NFS
>                               |  to esu092               |     to esu092
>                                |                        |
>                                 |                      |
>                               ---------------------------
>                              |    esu092 (file server)   |
>                               ---------------------------
>Here's the situation:
>If a client goes through the samba gateway 1 (esu064) and opens a file on
>then a file lock is placed on that file and it prevents any other client
which goes
>through the samba gateway 1 (esu064) to open that file on esu092 until the
file lock
>has gone.  If an nt client then connects through the samba gateway 2
(esu070), that
>samba gateway is not aware of the lock that exists on the opened file on
esu092 (which
>was placed upon it by the first samba gateway).
>As a result of this, the same file which should have an active file lock
on it from the
>first samba gateway, can be opened by two nt clients at the same time!
(ie. nt >workstation1 and nt workstation 2).  This causes work to the file
to be lost (i.e. the >last of the 2 ntclients to work on the file gets the
file saved to their >modifications).  The first nt client to work on the
file, gets their work overwritten >by the second nt client.
>How can you therefore make both the samba servers (gateways 1 and 2) to
acknowledge the >file locks placed on esu092 by each other to prevent
multiple access of the same opened >file at the same time?

I'd also like to know which file (if any) keeps track of locked files as
they are modified by users.

Thanks guys

More information about the samba-technical mailing list