Setting up CTDB on OCFS2 and VMs ...

Rowland Penny repenny241155 at
Fri Dec 12 14:11:53 MST 2014

On 12/12/14 20:52, Michael Adam wrote:
> Hi Rowland,
> I am really sorry that you are frustrated.
> Pleas keep on!

Frustrated might just be an understatement :-D

> We do try to document stuff, but clusters with
> ctdb is still an area that is not done by
> the average admin. And there are not so many
> people working on the code, so as usual,
> documentation sadly lacks behind.
> Someone like you, who with the help of us devs
> finally gets to a working system, might help
> us in the end to improve the docs! :-)

ER, thats why I am trying to get to work, then I can update the samba wiki.

> Clustering also relies on a whole additional
> area which is the corresponding cluster file
> systems used underneath, which makes it difficult
> to have comprehensive documentation for a
> concrete setup.
> That being said, there is documentation out
> there, but not necessarily terribly up to date,
> and not precisely what you want.

Yes, I think I have read most of it :-)

> On the samba wiki, there is the generic but
> somewhat superficial
> and as a specific example the GFS/CTDB/Samba howto:
> which is of course redhat-cluster/gfs specific as
> far as the file system is concerned.
> The manual pages of ctdb are also pretty good by now!
> It is true that Debian is especially rare in
> these clustered Samba docs. This is due to
> the fact, that for a long time, there was no
> big focus on cluster file systems in Debian.

Setting up the cluster on Debian seems to be easier than on redhat, I 
don't have to compile anything. The problems only start when I try to 
setup CTDB.

> A couple of years ago, I have given a couple
> of talks and courses about clustered Samba
> partly also using Debian and Gluster, but also
> RedHat and GFS. My 2010 notes
> even contain some note on what is different
> and needs to be considered on a Debian systems.
> (The main difference is that /etc/default is
> used instead of /etc/sysconfig by most packages.)
> At that time, OCFS2 was not yet ready for
> CTDB/Samba, and GlusterFS was mainly available
> in Debian, but did not perform very well.
> Now Gluster has been taken on by RedHat, and
> I think we can expect updates from that corner in the
> nearer future.
> Here is a paper explaining some of the
> fundamentals of CTDB and the basic configuration
> of CTDB and clustered samba on Top.
> And a pretty similar article from Linux Magazine:
> and an accompanying one on registry configuration:
> Some of the details need to be checked because the
> info is 4-5 years old, but the basics are still
> correct.
> As a last but possibly important remark (for those
> who have not fallen asleep by now ;-) let me
> mention that as far as I know, Stefan Kania
> (whom I have copied in this reply, since I am not
> certain that he is subscribed to the list) is currently
> working on a reproducible setup with Debian/Gluster/CTDB/Samba.
> Maybe he can give some insight on the specialities of
> a CTDB setup on current Debian.

If he could chime in, it would be very welcome.

> I apologize for having pointed mainly to my own
> writings, but at the time I have undertaken some
> considerable efforts to create some documentation
> and explanations, so I hope this is of any use. :-)
> Cheers - Michael
> PS: Also, you are asking why Ronnie suggests a single node
> cluster.
> Because it is always good to start out with a simple case.
> And once you mastered that, move on to more complicated things.
> And you can even see most config points in that 1-node cluster.

OK. I can take a hint, I will start again with one node :-)


> On 2014-12-12 at 10:36 +0000, Rowland Penny wrote:
>> On 11/12/14 18:32, ronnie sahlberg wrote:
>>> I just tried building a single-node "cluster" on debian with ctdb.
>> Why a single node ????
>>> I can check building a 4 node cluster next week when I am home from my travels.
>> Try it with two nodes
>>> To get ctdb running on ubuntu 14.10, as root:
>> Hang on, you said 'debian' above
>>> 1, Install the ctdb package:
>>> apt-get install ctdb
>>> 2, create a missing directory
>>> mkdir -p /var/lib/run/ctdb
>> Why is there a missing directory, sounds like a bug to me.
>>> 3, remove the reclock file
>>> vi /etc/default/ctdb
>>> and comment out CTDB_RECOVERY_LOCK
>> But I want the lock.
>>> 4, create a nodes file
>>> vi /etc/ctdb/nodes
>>> and add the line
>> Yes, but why '' ???
>>> 5, create a public addresses file
>>> vi /etc/ctdb/public_addresses
>>> and add the two lines
>>> lo
>>> lo
>> Do you have to create these ipaddresses, if so where and how
>>> 6, start ctdb
>>> service ctdb start
>> That is this first part I really understood.
>>> then check everything looks fine with 'ctbb status' and 'tail
>>> /var/log/ctdb/log.ctdb'
>>> That will not really create a very interesting cluster, just one node,
>>> two public addresses and all on loopback.
>>> But this should at least verify that ctdbd will start and run.
>>> Then you can just shut it down and edit
>>> /etc/ctdb/nodes|public_addresses and make them more interesting.
>> Again, why just one node. ??
>>> I personally suggest never running anything smaller than 4 node
>>> clusters for real data.
>> Yes, but I am testing, so where is the documentation for people like me, who
>> just want to get a couple of nodes up and running ???
>> Rowland
>>> Please see
>>> man ctdb
>>> man ctdbd
>>> less /etc/default/ctdb
>>> it should contain most to get started with ctdb.
>>> regards
>>> ronnie sahlberg.

More information about the samba-technical mailing list