[Samba] Glusterfs/CTDB/Samba file locking problem

Adrian Valeanu Adrian.Valeanu at idiada.com
Thu Jan 30 07:06:08 MST 2014


Hi guys,
I try to set up two identical installed up to date CentOS6 machines with Glusterfs/CTDB/Samba .
I have set up Glusterfs and it works. I have set up CTDB from CentOS and it seems to work too.
Samba is AD integrated and works mainly.
 
The main problem is that file locking seem to not work between the machines at all. If two Win7 clients try to open an document
from the same Samba server (MS Office Word 2010), the second one gets an notification, as expected, that the file is already opened. Unfortunately this does not
happen when he opens the same file on the second server. 
I can see that the file opening process gets distributed through ctdb to the second server when I use 
ctdb catdb locking.tdb
 
It looks like this->
key(24) = "\C9r\19\DB\EA\10Dz\F4\5C\15\9F\9Ff/\89\00\00\00\00\00\00\00\00"
dmaster: 1
rsn: 1
data(388) = "\02\00\00\00\00\00\00\00\94&\EAR\00\00\00\00\08f\9C\1D\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00nm\00\00\01\00\00\00\13F~\E8\C3\C9^&\00}\00\00\00\00\00\00\10\00\00\00\9F\01\02\00\01\00\00\00\00\00\00\003V\EAR\00\00\00\00\BA\86\02\00\00\00\00\00\C9r\19\DB\EA\10Dz\F4\5C\15\9F\9Ff/\89\00\00\00\00\00\00\00\00.O\9Di\00\00\00\00\5C\02\00\00\00\00\00\00\92\FD\DEu\00\00\00\00nm\00\00\01\00\00\00\13F~\E8\C3\C9^&\80\98\00\00\00\00\00\00@\00\00\00\80\00\10\00\07\00\00\00\00\00\00\003V\EAR\00\00\00\00\84\BE\05\00\00\00\00\00\C9r\19\DB\EA\10Dz\F4\5C\15\9F\9Ff/\89\00\00\00\00\00\00\00\00BO\9Di\00\00\00\00\5C\02\00\00\00\00\00\00\92\FD\DEu\00\00\00\00/media/gluster/data\00design/Neuer Ordner/Microsoft Word-Dokument (neu).docx\00\00"
 
key(24) = "\C9\1A\A6\A8\DC\0EDz\F4\5C\15\9F\9Ff/\89\00\00\00\00\00\00\00\00"
dmaster: 0
rsn: 0
data(388) = "\02\00\00\00\00\00\00\00\94&\EAR\00\00\00\00\08f\9C\1D\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\9FP\00\00\00\00\00\00\9C\81\CA\14\A99k\FF\C0r\00\00\00\00\00\00\10\00\00\00\9F\01\02\00\01\00\00\00\00\00\00\00 V\EAR\00\00\00\00\F5p\04\00\00\00\00\00\C9\1A\A6\A8\DC\0EDz\F4\5C\15\9F\9Ff/\89\00\00\00\00\00\00\00\00Z\01\9DM\00\00\00\00\12\04\00\00\00\00\00\00\92\FD\DEu\00\00\00\00\9FP\00\00\00\00\00\00\9C\81\CA\14\A99k\FF\80\8C\00\00\00\00\00\00@\00\00\00\80\00\10\00\07\00\00\00\00\00\00\00 V\EAR\00\00\00\00%\AC\0B\00\00\00\00\00\C9\1A\A6\A8\DC\0EDz\F4\5C\15\9F\9Ff/\89\00\00\00\00\00\00\00\00n\01\9DM\00\00\00\00\12\04\00\00\00\00\00\00\92\FD\DEu\00\00\00\00/media/gluster/data\00design/Neuer Ordner/Microsoft Word-Dokument (neu).docx\00\00"
 
Dumped 2 records
As you see the same file is mentioned twice because two clients have it open on two servers.
 
gluster volume info <- is OK on both machines
ctdb status <- is OK on both machines
wbinfo -t <- is OK on both machines
net ads info <- is OK on both machines
 
/etc/sysconfig/ctdb 
CTDB_RECOVERY_LOCK=/media/gluster/system/ctdblockfile
CTDB_NODES=/media/gluster/system/nodes
#CTDB_PUBLIC_ADDRESSES=/etc/ctdb/public_addresses
#CTDB_MANAGES_SAMBA=yes
#CTDB_MANAGES_WINBIND=yes
# CTDB_MANAGES_NFS=yes
ulimit -n 10000
CTDB_LOGFILE=/var/log/log.ctdb
CTDB_SYSLOG=no
CTDB_DEBUGLEVEL=NOTICE
/etc/ctdb/nodes
192.168.10.232
192.168.10.233
I do not use /etc/ctdb/public_addresses because I do not want HA or ip takeover to happen.
 
My samba config looks like this:
In [global] I have
    clustering = yes
    idmap backend = tdb2
    vfs objects = fileid
    fileid:mapping = fsname
I already tried this ctdb package https://ftp.samba.org/pub/ctdb/packages/redhat/RHEL6/2.5.1/ but reverted back to 1.0.114(CentOS6 original) because it did not made any difference.
 
ctdb is ctdb-1.0.114.5-3.el6.x86_64
glusterfs is glusterfs-3.4.2-1.el6.x86_64
samba is samba-3.6.9-167.el6_5.x86_64
 
I would appreciate any advice you may have.
Best regards.
 
 
 
 
 
 
 
 
 
 
 
 
 


More information about the samba mailing list