Does Samba clustering with ctdb require idmap backend = tdb2?

Michael Adam obnox at
Thu Nov 13 01:12:16 MST 2014


On 2014-11-12 at 13:22 -0800, ronnie sahlberg wrote:
> On Wed, Nov 12, 2014 at 1:09 PM, Richard Sharpe
> <realrichardsharpe at> wrote:
> > Hi folks,
> >
> > I am trying to set up a CTDB cluster and I notice that in the Samba
> > Wiki, it says:
> >
> >
> >
> > clustering = yes
> > idmap backend = tdb2

The "tdb2" backend stems from the times when ctdb did not provide
persistent databases in the cluster but only volatile tdbs.

The identical id mapping functionality is provided by the "tdb"
backend which is also the default backend. Even the database
format is identical. The only two differences between the
modules are:
- The tdb module offers more upgrade code paths (due to longer history).
- The tdb2 module offers the "idmap:script" functionality which
  allows to externalize the retrieval of mappings to an external
  ==> see man idmap_tdb2 (8)
  ==> This is conceptually bad and I would like to tear that
      functionality out into a "script" or "external" backend.
      Then the tdb2 module could be removed.

Also note that when using Samba 3.6 and newer, you should not
use the deprecated "idmap backend" any more but
"idmap config * : backend" instead. See the explanation of
"idmap config:OPTION" and "idmap backend" in man smb.conf (5)

> > Also, what is the fileid:mappin = fsname entry about?
> fileid:mappin = fsname
> This entry is to handle the case when your cluster filesystem can not
> guarantee a stable stat.st_dev
> and thus if st_dev can vary across the nodes in the cluster then
> (stat.st_ino, stat.st_dev) will no longer be
> a clusterwide invariant.
> For those filesystems you need to set
> fileid:mappin = fsname
> and this changes samba to instead use (stat.st_ino, <mountpoint name>) instead.

- This is the "fileid" vfs module. ==> see man vfs_fileid (8) .... :-)
- "fileid:mapping" (not "fileid:mappin") is the deprecated
  version of "fileid:algorithm".
- Another algorithm available besides "fsid" is "fsname".
- If there are file systems that don't work with either of the
  algorithms, but there is a generic algorithm that would help
  them, we should add a new backend algorithm to the "fileid"

Cheers - Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <>

More information about the samba-technical mailing list