Setting up CTDB on OCFS2 and VMs ...

ronnie sahlberg ronniesahlberg at gmail.com
Fri Dec 12 07:21:57 MST 2014


On Fri, Dec 12, 2014 at 5:36 AM, Rowland Penny <repenny241155 at gmail.com> 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 was under the impression you could not get ctdbd to run at all,  so
as an example to troubleshoot and test
keep it as simple as possible.

A single node cluster running on loopback is as simple as it gets.
Once/if you can get that trivial cluster to run ctdbd successfully it
is trivial to change the configuration files to make it a multi node
cluster.

>
>> 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.

Yepp it definitely is.
There is something wrong with the deb package that at least ubuntu
14.10 ships with since it does not create required directory
structure.
Should open a bug with debian and/or ubuntu so that their folks that
package this can fix the bug.


>
>>
>> 3, remove the reclock file
>> vi /etc/default/ctdb
>> and comment out CTDB_RECOVERY_LOCK
>
>
> But I want the lock.

Then  you need a fcntl() capable distributed lock manager.
I think richards emails before showed what to do. A lot of manual work
apparently since the debian packages apparently did not ship with a
functioning lock manager
and he had to tweak the sources they ship and recompile locally.


>
>> 4, create a nodes file
>> vi /etc/ctdb/nodes
>> and add the line   127.0.0.1
>
>
> Yes, but why '127.0.0.1' ???

It is the simplest possible cluster.
You wanted a test to see if you could configure / run ctdbd at all,
so lets do it using the simplest possible test.

>
>>
>> 5, create a public addresses file
>> vi /etc/ctdb/public_addresses
>> and add the two lines
>> 127.0.0.2/8 lo
>> 127.0.0.3/8 lo
>
>
> Do you have to create these ipaddresses, if so where and how

No, you should not/need not create them on the system.
Ctdbd will create and assign these addresses automatically and
dynamically while the cluster is running.

>
>> 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. ??

Simplest possible cluster to see that you can get ctdbd running.

>
>> 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 ???

/etc/sysconfig/ctdb on RPM based systems.
/etc/default/ctdb onDEV based systems

man ctdb
man ctdbd

>
> Rowland
>
>
>>
>> Please see
>> man ctdb
>> man ctdbd
>> less /etc/default/ctdb
>> http://ctdb.samba.org/configuring.html
>>
>> it should contain most to get started with ctdb.
>>
>>
>> regards
>> ronnie sahlberg.
>>
>>
>>
>


More information about the samba-technical mailing list