2007-06-01 09:23:57 +04:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
< HTML >
< HEAD >
< TITLE > ctdb< / TITLE >
< / HEAD >
< BODY BGCOLOR = "#ffffff" TEXT = "#000000" VLINK = "#292555" LINK = "#292555" ALINK = "#cc0033" >
2007-06-03 05:40:50 +04:00
< h1 > CTDB< / h1 >
2007-06-01 09:23:57 +04:00
2007-06-03 09:56:23 +04:00
CTDB is a cluster implementation of the TDB database used by Samba and
other projects to store temporary data. If an application is already
using TDB for temporary data it is very easy to convert that
application to be cluster aware and use CTDB instead.
< p > CTDB provides the same types of functions as TDB but with the
difference that it is clustered and thus it appears as a TDB database
that spans multiple physical hosts in a cluster.
< p > Features include:
< ul >
< li > CTDB provides a TDB that has consistent data and consistent locking across
all nodes in a cluster.
< li > CTDB is very fast.
< li > In case of node failures, CTDB will automatically recover and
repair all TDB databases that it manages.
< li > CTDB is the core component that provides < strong > pCIFS< / strong >
("parallel CIFS") with Samba3/4.
< li > CTDB provides HA features such as node monitoring, node failover,
and IP takeover.
< li > CTDB provides a reliable messaging transport to allow applications
linked with CTDB to communicate to other instances of the application
running on different nodes in the cluster.
< li > CTDB has pluggable transport backends. Currently implemented backends are TCP
and Infiniband.
< li > CTDB supports a system of application specific management scripts,
allowing applications that depend on network or filesystem resources
to be managed in a highly available manner on a cluster.
< / ul >
2007-06-01 09:23:57 +04:00
2007-06-03 09:56:23 +04:00
< h2 > Requirements< / h2 >
2007-06-03 05:48:13 +04:00
2007-06-03 09:56:23 +04:00
CTDB relies on that a clustered filesystem is available and shared on
all nodes that participate in the CTDB cluster. This filesystem must
be mounted and available on all nodes in the CTDB cluster.
2007-06-03 05:40:50 +04:00
2007-06-03 09:56:23 +04:00
< p > On top of this cluster filesystem, CTDB then provides clustered HA
features so that data from the clustered filesystem can be exported
through multiple nodes in the CTDB cluster using various
services. Currently this is used to export data off a clustered
filesystem using Samba (for SMB/CIFS) and NFS to Windows and Unix
clients.
2007-06-03 05:40:50 +04:00
< h2 > TDB< / h2 >
2007-06-03 09:56:23 +04:00
TDB is a very fast simple database that was originally developed for
use in Samba. Today several other projects use TDB to store their data.
< p > See < a
href="http://viewcvs.samba.org/cgi-bin/viewcvs.cgi/branches/SAMBA_4_0/source/lib/tdb/docs/README">TDB
README file< / a > for some description of how TDB is used.
2007-06-03 05:40:50 +04:00
2007-06-03 10:33:08 +04:00
< h2 > Documentation< / h2 >
2007-06-01 09:23:57 +04:00
2007-06-03 10:33:08 +04:00
Documentation on how to install and configure CTDB is available in the
< a href = "http://wiki.samba.org/index.php/CTDB_Setup" > CTDB
Wiki< / a > . Please read all of the documentation carefully.
< h2 > High Availability Features< / h2 >
2007-06-03 09:56:23 +04:00
The CTDB nodes in a cluster designates one node as a recovery master
through an election process. If the recovery master node fail a
new election is initiated so that the cluster will always guarantee
there will be a recovery master. The recovery master will
continuously monitor the cluster to verify that all nodes contain a
consistent configuration and view of the cluster and will initiate a
recovery process when required.
< p > During the recovery phase, the recovery master will automatically
rebuild/recover all clustered TDB database to ensure that the
databases are consistent. Recovery typically takes between 1 and 3
seconds. During the recovery period the databases are 'frozen', and
all IO operations by ctdb clients are suspended.
2007-06-03 05:40:50 +04:00
2007-06-05 12:40:43 +04:00
< h3 > Is CTDB a HA solution?< / h3 >
Yes and no.< br >
2007-06-05 12:42:49 +04:00
CTDB alone is not a HA solution, but when you combine CTDB with a clustered
filesystem it becomes one.< br >
2007-06-05 12:40:43 +04:00
CTDB is primarily developed around the concept of having a shared cluster
filesystem shared across all the nodes in the cluster to provide the features
required for building a NAS cluster.< br >
Thus CTDB relies on an external component (the cluster filesystem) to provide
the mechanisms for avoiding split-brain and other difficult tasks.< br > < br >
However, If you applications do need a clustered filesystem for all the nodes,
in that scenario CTDB will provide a very easy to install and manage
solution for your clustering HA needs.
2007-06-03 05:40:50 +04:00
< h3 > IP Takeover< / h3 >
2007-06-03 09:56:23 +04:00
When a node in a cluster fails, CTDB will arrange that a different
node takes over the IP address of the failed node to ensure that the
IP addresses for the services provided are always available.
< p > To speed up the process of IP takeover and when clients attached to
a failed node recovers as fast as possible, CTDB will automatically
generate gratuitous ARP packets to inform all nodes of the changed MAC
address for that IP. CTDB will also send "tickle ACK" packets to all
attached clients to trigger the clients to immediately recognize that
the TCP connection needs to be re-established and to shortcut any TCP
retransmission timeouts that may be active in the clients.
2007-06-03 05:40:50 +04:00
< h2 > Services using CTDB< / h2 >
< h3 > Samba 3/4< / h3 >
2007-06-03 09:56:23 +04:00
Extensions has been developed to Samba3 and Samba 4 to integrate with
CTDB to build a clustered highly available version of Samba where the
same data/network shares are exported read-write from multiple nodes
in a cluster. These versions of Samba have been demonstrated to provide very good
scalability.
< p > See < a href = "http://wiki.samba.org/index.php/CTDB_Project" > CTDB
Project at samba.org< / a > for more information about
this < strong > pCIFS< / strong > implementation.
2007-06-03 05:40:50 +04:00
< h3 > NFS v2/v3< / h3 >
2007-06-03 09:56:23 +04:00
NFS v2/v3 has been successfully tested with exporting the same
data/network share from multiple nodes in a CTDB cluster with correct
file locking behaviour and lock recovery.
See < a
href="http://wiki.samba.org/index.php/CTDB_Setup#Setting_up_CTDB_for_clustered_NFS">Configuring
NFS for CTDB clustering< / a > for instructions on how to configure a
CTDB cluster to provide NFS clustering.
2007-06-03 05:40:50 +04:00
2007-06-01 09:23:57 +04:00
< h2 > Discussion and bug reports< / h2 >
2007-06-03 10:33:08 +04:00
For discussions please use
2007-06-03 09:56:23 +04:00
the < ahref = " https: / / lists . samba . org / mailman / listinfo / samba-technical " > samba-technical< / a >
2007-06-03 10:33:08 +04:00
mailing list. To submit a bug report, please use
the < a href = "http://bugzilla.samba.org/" > Samba bugzilla< / a > bug
tracking system.
2007-06-03 05:40:50 +04:00
2007-06-03 09:56:23 +04:00
< p > We would be very interested in hearing from and work with other
projects that want to make their services cluster aware using CTDB.
2007-06-03 05:40:50 +04:00
2007-06-03 10:33:08 +04:00
< p > CTDB discussions also happen on the #ctdb IRC channel on freenode.net
2007-06-01 09:23:57 +04:00
< h2 > Download< / h2 >
2007-06-01 11:16:19 +04:00
You can download the latest source release
using < a href = "http://bazaar-vcs.org/" > bzr< / a > . Install bzr, then run
this command:
2007-06-01 09:23:57 +04:00
< pre >
2007-06-01 11:16:19 +04:00
bzr branch http://samba.org/~tridge/ctdb
2007-06-01 09:23:57 +04:00
< / pre >
2007-06-01 11:16:19 +04:00
Or alternatively you can use rsync like this:
2007-06-01 09:23:57 +04:00
< pre >
2007-06-01 11:16:19 +04:00
rsync -avz samba.org::ftp/unpacked/ctdb .
2007-06-01 09:23:57 +04:00
< / pre >
2007-06-01 11:16:19 +04:00
< h2 > Binary Packages< / h2 >
2007-06-01 10:07:13 +04:00
Note that packages are so far only available for RHEL4. Other packages
will come later. < p >
See < a href = "packages/" > packages< / a > directory for package
downloads.
2007-06-01 09:23:57 +04:00
< hr >
2007-06-01 09:31:23 +04:00
< h2 > Developers< / h2 >
2007-06-01 09:23:57 +04:00
< a href = "http://samba.org/~tridge/" > Andrew Tridgell< / a > < br >
2007-06-01 09:31:23 +04:00
Ronnie Sahlberg< br >
2007-06-01 11:16:19 +04:00
Peter Somogyi< br >
2007-06-01 09:31:23 +04:00
2007-06-01 09:23:57 +04:00
< / BODY >
< / HTML >