Setting up CTDB on OCFS2 and VMs ...
martin at meltin.net
Wed Dec 31 15:27:15 MST 2014
On Wed, 31 Dec 2014 18:40:35 +0000, Rowland Penny
<repenny241155 at gmail.com> wrote:
> On 31/12/14 17:59, Michael Adam wrote:
> > The problem that could explain the "Could not initialize ..."
> > message would be that samba tries to access CTDB under the
> > socket file /tmp/ctdbd.socket (default in old ctdb versions)
> > and the new ctdbd uses /var/run/ctdb/ctdbd.socket by default.
> Now that is interesting, because if I do not put a line in smb.conf
> saying where ctdbd.socket is, it tries to use /tmp. With the line in
> smb.conf, it just errors with: connect(/var/lib/ctdb/ctdb.socket)
> failed: No such file or directory
> > So you could (without needing to recompile) test if things
> > work out more nicely if you set:
> > "ctdbd socket = /var/run/ctdb/ctdbd.socket"
> > in smb.conf
> No, but finding out where the socket is and altering the line to: ctdbd
> socket = /var/lib/run/ctdb/ctdbd.socket
This has already been discussed:
It is a Debian packaging issue:
I'm not sure what the policy is for getting a new version into
backports - that's another Debian issue.
> > and (for the sake of explicitness):
> > "CTDB_SOCKET=/var/run/ctdb/ctdbd.socket"
> > in /etc/default/ctdb.
> I have tried similar lines in /etc/default/ctdb, but whatever I tried,
> it just wouldn't let ctdb start.
Fixed nearly 18 months ago in CTDB 2.4. The issue there was that the
daemon would respect the value in /etc/default/ctdb but CTDB_SOCKET
wasn't exported, so the ctdb CLI tool couldn't find the socket when
invoked from scripts.
However, the real solution is to use the socket that is configured at
compile time, provided the distribution doesn't break it. We should
change CTDB_SOCKET to a test/debug option.
Incidentally, on my Debian Jessie system I can't start CTDB in any sane
# systemctl start ctdb
Failed to start ctdb.service: Unit ctdb.service failed to load: No such file or directory.
# ls -l /lib/systemd/system/ctdb.service
-rw-r--r--. 1 root root 306 Dec 15 04:30 /lib/systemd/system/ctdb.service
I can start CTDB with:
/usr/sbin/ctdbd_wrapper /run/ctdb/ctdbd.pid start
I don't know why the failure with systemctl (and service) occurs.
There's nothing useful logged. strace doesn't help because the error
looks to occur on the systemd side, and that's a black box that I
don't have time to learn more about. It looks to be a CTDB/systemd
issue on Debian. I've submitted a Debian bug:
If you find other Debian packaging issues then please report them (to
peace & happiness,
More information about the samba-technical