ctdb getdbmap doesn't include registry.tdb

Martin Schwenke martin at meltin.net
Tue Jul 5 05:18:01 UTC 2016

On Mon, 4 Jul 2016 23:55:14 -0500, Steve French <smfrench at gmail.com>

> On Fri, Jul 1, 2016 at 3:15 PM, Martin Schwenke <martin at meltin.net> wrote:
> > On Fri, 1 Jul 2016 08:40:31 -0700, Richard Sharpe
> > <realrichardsharpe at gmail.com> wrote:
> >  
> >> On Fri, Jul 1, 2016 at 8:23 AM, Steve French <smfrench at gmail.com> wrote:  
>  [...]  
> >>
> >> That is strange because I am pretty certain it was managing the
> >> registry.tdb a couple of years ago when I checked this out.  
> >
> > This is on a cluster running CTDB from master:
> >
> >   [root at m1n1 ~]# ctdb getdbmap | grep registry
> >   dbid:0x6cf2837d name:registry.tdb path:/var/lib/ctdb/persistent/registry.tdb.0 PERSISTENT
> >
> > I don't think this has ever been broken... well, at least not in
> > recent times...
> >  
> >> What happens if you use net conf blah blah on one of the nodes. Can
> >> you see the new entries on other nodes?  
> No - ran net conf addshare on one node, and only see the share with
> net conf listshares on that node (not the other).  On the other hand
> new users added via "smbpasswd -a" do show up on both nodes.
> >> Perhaps it is just an error in the ctdb tool.  
> >
> > Or perhaps smb.conf is missing the following line?
> >
> >         ctdb:registry.tdb=yes
> >
> > Now documented at:
> >
> >   https://wiki.samba.org/index.php/CTDB_Setup#Critical_smb.conf_parameters  
> Adding that entry in smb.conf after the fact may not be good enough (I
> tried adding it to smb.conf on all nodes) - does the database have to
> be converted if samba started once without the parm in smb.conf, the
> parm is added, and then samba and ctdb restarted?  I will try an
> experiment later making sure smb.conf is updated before first start of
> the services, but it does seem weird that all the other databases show
> up - and smb.conf specifies "ctdb:registry.tdb=yes" now.   This is
> latest 4.4-test branch from last week.

I think that non-CTDB-managed TDBs are stored somewhere else
(e.g. /var/lib/samba).  That would mean that CTDB can't find it.  I
think you would have to back up the registry, switch to having CTDB
manage it (including restart) and then restore it.

OK, I'm going to have to admit to having no idea what it happening.  I
shut down CTDB on all nodes of my cluster (master + stuff, but I can't
think of relevant changed), commented out that smb.conf line on all
nodes of my cluster, removed the registry.tdb.* files on all nodes,
restarted CTDB... and it is managing the registry.

Can anyone explain the behaviour that Steve is seeing?

peace & happiness,

More information about the samba-technical mailing list