[Samba] CTDB potential locking issue

Martin Schwenke martin at meltin.net
Thu Sep 20 09:49:16 UTC 2018


Hi David,

On Wed, 19 Sep 2018 19:44:20 +0100, David C via samba
<samba at lists.samba.org> wrote:

> I just found the file, it's a config file that about 250 hosts read every
> half an hour so it makes sense this is getting some contention. However,
> the strange thing is, the share the file is in is a read-only share:
> 
> [dist$]
>         comment = Windows dist
>         path = /path/to/share
>         wide links = Yes
>         browseable = Yes
>         read only = Yes
>         guest only = Yes
>         guest ok = Yes
>         public = Yes
>         hide dot files = yes
>         hide files = /$*/
>         hide special files = yes
> 
> The share is accessed by the Windows machines to install software, read
> configs etc. I would have thought the share being read only would preclude
> this type of locking behaviour?

What Jeremy said.  :-)

> Do I need to explicitly disable locking in the share definition?

There might be something like that you can do.  I'm not sure which
options will be useful.

I suppose that you could use "fileid:algorithm = hostname" on the share
to break coherency.

> I suppose I could still use the fileid:nolockinode for this file, do
> I just add fileid:nolockinode = *inodenumber *to the global section
> of my smb.conf?

You would want to add it to the share or you might break coherency on
a file in a different share.  Note that this is a very inflexible option
and if the file is deleted/replaced then things can change in
surprising ways.

If you do any of these things then, depending on mode of operation, you
probably want to ensure that the share is either updated directly from
the host or is updated via a read/write admin-only version of the share.

You probably also need to be carefully with oplocks/leases and
updates from another source.

Hopefully someone else has some more useful comments...  :-)

peace & happiness,
martin



More information about the samba mailing list