Understanding Samba and CTDB locking
gepardcv at gmail.com
Wed Feb 20 03:02:37 GMT 2008
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'.
More information about the samba-technical