Difference between revisions of "Configuring clustered Samba"

From SambaWiki
Line 28: Line 28:
 
make
 
make
   
You should replace the /gpfs0/samba/prefix path with the cluster shared storage path you will use to install Samba.
+
You should replace the /gpfs0/samba/prefix path with the cluster shared storage path you will use to install Samba. The path should to be a directory that is the same on all nodes of the cluster. If you are setting up a virtual cluster on loopback then this can be any local directory.
  +
  +
The /usr/src/ctdb path should be replaced with the path to the ctdb sources that you downloaded above

Revision as of 08:04, 27 April 2007

Setting up a simple CTDB Samba cluster

As of April 2007 you can setup a simple Samba3 or Samba4 CTDB cluster, running either on loopback (with simulated nodes) or on a real cluster with TCP. This page will tell you how to get started.

Getting the code

You need two source trees, one is a copy of Samba3 with clustering patches, and the other is the ctdb code itself. Both source trees are stored in bzr repositories. See http://bazaar-vcs.org/ for more information on bzr.

The fastest way to checkout an initial copy of the Samba3 tree with clustering patches is:

  rsync -avz samba.org::ftp/unpacked/samba_3_0_ctdb .

To update this tree when improvements are made in the upstream code do this:

   cd samba_3_0_ctdb
   bzr merge http://samba.org/~tridge/samba_3_0_ctdb

To get an initial checkout of the ctdb code do this:

  rsync -avz samba.org::ftp/unpacked/ctdb .

To update this tree when improvements are made in the upstream code do this:

   cd ctdb
   bzr merge http://samba.org/~tridge/ctdb

Building the Samba3 tree

To build a copy of Samba3 with clustering and ctdb support you should do this:

   cd samba_3_0_ctdb/source
   ./autogen.sh
   ./configure --prefix=/gpfs0/samba/prefix --with-ctdb=/usr/src/ctdb --with-cluster-support --enable-pie=no
   make proto
   make

You should replace the /gpfs0/samba/prefix path with the cluster shared storage path you will use to install Samba. The path should to be a directory that is the same on all nodes of the cluster. If you are setting up a virtual cluster on loopback then this can be any local directory.

The /usr/src/ctdb path should be replaced with the path to the ctdb sources that you downloaded above