Difference between revisions of "CTDB and Clustered Samba"

(Initial top-level CTDB page, based on description from ctdb(7))
 
(Add getting/building instructions, mostly copied over from CTDB_Setup)
Line 1: Line 1:
 
= CTDB and Clustered Samba =
 
= CTDB and Clustered Samba =
 
== Introduction ==
 
  
 
CTDB is a clustered database component in clustered Samba that provides a high-availability load-sharing CIFS server cluster.
 
CTDB is a clustered database component in clustered Samba that provides a high-availability load-sharing CIFS server cluster.
Line 14: Line 12:
  
 
Combined with a cluster filesystem CTDB provides a full high-availablity (HA) environment for services such as clustered Samba, NFS and other services.
 
Combined with a cluster filesystem CTDB provides a full high-availablity (HA) environment for services such as clustered Samba, NFS and other services.
 +
 +
= Supported platforms =
 +
 +
CTDB is primarily developed and tested on Linux.  A subset of features may work on other platforms.
 +
 +
= Getting and Building CTDB =
 +
 +
Samba and CTDB must be installed on all nodes of a cluster.  CTDB is part of Samba (>= 4.2.0), so to get CTDB you need to [https://www.samba.org/samba/download/ get Samba].
 +
 +
== Getting CTDB Source code ==
 +
 +
If you [[Obtaining_Samba|download source code for Samba &gt;= 4.2.0]] then CTDB is included in the <code>ctdb</code> subdirectory.
 +
 +
== Binary packages ==
 +
 +
* Your operating system may include pre-built packages for Samba and CTDB
 +
 +
* If you use pre-built packages then you need to ensure that Samba was built with cluster support
 +
 +
* CTDB will usually be in a separate package to other Samba components called <code>ctdb</code>
 +
 +
== Building from source code ==
 +
 +
CTDB should be built with Samba.  Add the following options to the <code>./configure</code> command.
 +
 +
; <code>--with-cluster-support</code> : This enables clustering support in Samba and includes CTDB in the build
 +
; <code>--with-shared-modules=idmap_rid,idmap_tdb2,idmap_ad</code> : Clustered Samba needs an IDMAP facility so it is worth building a few
 +
 +
Other than that, just [[Build_Samba_from_Source|follow instructions for building Samba]].
 +
 +
== Legacy CTDB versions ==
 +
 +
You should use a version of CTDB that comes with [[Samba_Release_Planning|a supported Samba version]].
 +
 +
However, [https://download.samba.org/pub/ctdb/ legacy, standalone versions of CTDB are still available] (including [[CTDB2releaseNotes|2.x]]).  These versions were used with Samba versions older than 4.2.0.
 +
 +
The code is also available from the CTDB git repository at git://git.samba.org/ctdb.git.  See also the [https://git.samba.org/?p=ctdb.git;a=summary GIT web interface].

Revision as of 00:04, 21 October 2016

CTDB and Clustered Samba

CTDB is a clustered database component in clustered Samba that provides a high-availability load-sharing CIFS server cluster.

The main functions of CTDB are:

  • Provide a clustered version of the TDB database with automatic rebuild/recovery of the databases upon node failures.
  • Monitor nodes in the cluster and services running on each node.
  • Manage a pool of public IP addresses that are used to provide services to clients. Alternatively, CTDB can be used with LVS.

Combined with a cluster filesystem CTDB provides a full high-availablity (HA) environment for services such as clustered Samba, NFS and other services.

Supported platforms

CTDB is primarily developed and tested on Linux. A subset of features may work on other platforms.

Getting and Building CTDB

Samba and CTDB must be installed on all nodes of a cluster. CTDB is part of Samba (>= 4.2.0), so to get CTDB you need to get Samba.

Getting CTDB Source code

If you download source code for Samba >= 4.2.0 then CTDB is included in the ctdb subdirectory.

Binary packages

  • Your operating system may include pre-built packages for Samba and CTDB
  • If you use pre-built packages then you need to ensure that Samba was built with cluster support
  • CTDB will usually be in a separate package to other Samba components called ctdb

Building from source code

CTDB should be built with Samba. Add the following options to the ./configure command.

--with-cluster-support 
This enables clustering support in Samba and includes CTDB in the build
--with-shared-modules=idmap_rid,idmap_tdb2,idmap_ad 
Clustered Samba needs an IDMAP facility so it is worth building a few

Other than that, just follow instructions for building Samba.

Legacy CTDB versions

You should use a version of CTDB that comes with a supported Samba version.

However, legacy, standalone versions of CTDB are still available (including 2.x). These versions were used with Samba versions older than 4.2.0.

The code is also available from the CTDB git repository at git://git.samba.org/ctdb.git. See also the GIT web interface.