CTDB and Clustered Samba: Difference between revisions
From SambaWiki
(Change first heading) |
Slowfranklin (talk | contribs) |
||
(24 intermediate revisions by 4 users not shown) | |||
Line 21: | Line 21: | ||
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]. |
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]. |
||
More details: |
|||
== Getting CTDB Source code == |
|||
* [[Getting and Building CTDB]] |
|||
If you [[Obtaining_Samba|download source code for Samba >= 4.2.0]] then CTDB is included in the <code>ctdb</code> subdirectory. |
|||
* [[Upgrading a CTDB cluster]] |
|||
⚫ | |||
== Binary packages == |
|||
* [[Basic CTDB configuration]] |
|||
* Your operating system may include pre-built packages for Samba and CTDB |
|||
* [[Setting up a cluster filesystem]] |
|||
* [[Configuring the CTDB recovery lock]] |
|||
* [[Adding public IP addresses]] |
|||
* [[Configuring clustered Samba]] |
|||
* [[Setting up CTDB for Clustered NFS]] |
|||
* [[Setting up CTDB with other services]] |
|||
* [[Advanced CTDB configuration]] |
|||
* [[Samba_CTDB_GPFS_Cluster_HowTo|CTDB with GPFS]] |
|||
* [[Samba_CTDB_GlusterFS_Cluster_HowTo|CTDB with GlusterFS]] |
|||
* [[GFS_CTDB_HowTo|CTDB with GFS]] |
|||
= Analysing CTDB problems = |
|||
* If you use pre-built packages then you need to ensure that Samba was built with cluster support |
|||
* [[CTDB Performance]] |
|||
: You can get information about smbd's clustering features: |
|||
* [[Merged logs]] |
|||
* [[CTDB log file search patterns]] |
|||
= Developing CTDB = |
|||
# smbd -b | grep -i 'ctdb\|cluster' |
|||
CLUSTER_SUPPORT |
|||
CTDB_SOCKET |
|||
Cluster support features: |
|||
CLUSTER_SUPPORT |
|||
CTDB_SOCKET: /var/run/ctdb/ctdbd.socket |
|||
CTDB_PROTOCOL: 1 |
|||
* [[CTDB database design]] |
|||
: Note that output may vary slightly, but the <code>CLUSTER_SUPPORT</code> feature must be present. |
|||
* [[Running CTDB tests]] |
|||
= Historical and Background Information = |
|||
* CTDB will usually be in a separate package to other Samba components called <code>ctdb</code> |
|||
Note that some of this information is out of date. |
|||
== 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]. |
|||
⚫ | |||
* [[CTDB Project]] |
|||
* [[CTDB_Setup|Configuring a Samba Cluster with CTDB]] |
|||
* [[Clustered Samba]] |
|||
* [[Samba & Clustering]] |
|||
* [http://samba.org/~obnox/presentations/sambaXP-2009/ Michael Adam's clustered NAS articles] |
Latest revision as of 09:47, 2 February 2023
Introduction
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.
More details:
Configuring Clusters with CTDB
- Basic CTDB configuration
- Setting up a cluster filesystem
- Configuring the CTDB recovery lock
- Adding public IP addresses
- Configuring clustered Samba
- Setting up CTDB for Clustered NFS
- Setting up CTDB with other services
- Advanced CTDB configuration
- CTDB with GPFS
- CTDB with GlusterFS
- CTDB with GFS
Analysing CTDB problems
Developing CTDB
Historical and Background Information
Note that some of this information is out of date.