Understanding Samba and CTDB locking
abartlet at samba.org
Wed Feb 20 04:35:26 GMT 2008
On Tue, 2008-02-19 at 22:02 -0500, Constantine Vetoshev wrote:
> I'm trying to set up a basic cluster for Samba using CTDB. For my
> testing, the shared area is just a share exported from a Windows
> fileserver and mounted with smbmount. I built the latest source trees
> from public git repositories. I'm not using public IPs or anything; I
> just want to play with the cluster and see how it works.
> CTDB seems to run fine on the two VMs I set up for testing. 'ctdb
> status' reports that both nodes are OK. Samba also seems to run fine
> on both nodes with 'clustering = yes' and 'idmap backend = tdb2' and
> 'private dir = /mnt/windows/share', and it dutifully reported errors
> in its log and stopped working when I shut down its local CTDB node.
> Unfortunately, I see no signs of shared knowledge of locks in the
> cluster. I just started Word and opened the same file from two
> different Samba shares, both of which remount the same underlying
> Windows share, and Word didn't complain at all. This is exactly the
> behavior I saw when I tried using 3.0.28 without clustering compiled
> in. If I try this trick pointing to one Samba server, by creating two
> shares which point to the same underlying path and accessing the same
> file on both shares, Word always notices a lock.
> Before I dive into the code, am I missing something obvious about how
> CTDB is supposed to work? Did I grossly misconfigure the whole thing?
> I just started ctdbd with a --relock and --logfile argument, and
> didn't touch anything else. The Samba setup is all defaults, except I
> set 'passdb backend = tdbsam'.
The filesystem on the shared area must support posix locking, and be
read/write coherent (I think). I don't think smbfs is up to that
Also, you should ensure the lock directory is on the clustered
Authentication Developer, Samba Team http://samba.org
Samba Developer, Red Hat Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20080220/55f729ea/attachment.bin
More information about the samba-technical