Integrating CTDB, GlusterFS, and the Samba 4 Server
CTDB is the software that implements the clusterization of the Trivial Database (TDB)  used by Samba . As CTDB provides functionalities that are similar to those provided by TDB (for example, the same type of functions), Samba or any other project/software that already uses the Trivial Database can migrate to a clustered version (CTDB) with minimal effort.
CTDB needs a special lock file that is accessible from any node, so we will create it on our
glusterfs volume (for example,
smb01) in a specific directory called
ctdb. The following procedure needs to be run in just one node:
root@gluster1:~# mkdir –p /var/lib/samba/glusterfs && echo OK OK root@gluster1:~# cp -pRf /etc/fstab /etc/fstab-`date ...