add a page for configuring samba
authorRonnie Sahlberg <sahlberg@ronnie>
Fri, 8 Jun 2007 23:31:56 +0000 (09:31 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Fri, 8 Jun 2007 23:31:56 +0000 (09:31 +1000)
web/index.html
web/samba.html [new file with mode: 0644]

index 63049415d9e9f82ddc40f367d451e84b287a0002..2f3ad69c302c4ea6f1994572a9f15b6a6709a068 100644 (file)
@@ -66,6 +66,7 @@ README file</a> for some description of how TDB is used.
 <li><a href="building.html">Building Samba and CTDB</a><br>
 <li><a href="configuring.html">Configuring CTDB</a><br>
 <li><a href="testing.html">Starting and testing CTDB</a><br>
+<li><a href="samba.html">Setting up clustered samba</a><br>
 </ul>
 
 <br>
diff --git a/web/samba.html b/web/samba.html
new file mode 100644 (file)
index 0000000..4a0b32e
--- /dev/null
@@ -0,0 +1,85 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+<HEAD>
+<TITLE>Setting up clustered samba</TITLE>
+</HEAD>
+<!--#include virtual="header.html" -->
+
+<h1>Setting up clustered samba</h1>
+
+It is assumed tou have already installed the ctdb version of samba and also installed, configured and tested CTDB.
+
+<h2>Create a user account</h2>
+
+First you need to initialise the Samba password database so that you have some user that can authenticate to the samba service.<br>
+Do this by running:
+<pre>
+  smbpasswd -a root
+</pre>
+
+Samba with clustering must use the tdbsam or ldap SAM passdb backends (it must not use the default smbpasswd backend), or must be configured to be a member of a domain.<br>
+The rest of the configuration of Samba is exactly as it is done on a normal system.<br><br>
+See the docs on http://samba.org/ for details.
+
+<h2>Critical smb.conf parameters</h2>
+
+A clustered Samba install must set some specific configuration parameters
+<pre>
+  clustering = yes
+  idmap backend = tdb2
+  private dir = /a/directory/on/your/cluster/filesystem
+</pre>
+
+It is vital that the private directory is on shared storage. 
+
+<h2>Using smbcontrol</h2>
+
+You can check for connectivity to the smbd daemons on each node using smbcontrol
+<pre>
+  smbcontrol smbd ping
+</pre>
+
+<h2>Using Samba4 smbtorture</h2>
+
+The Samba4 version of smbtorture has several tests that can be used to benchmark a CIFS cluster.<br>
+You can download Samba4 like this:
+<pre>
+  svn co svn://svnanon.samba.org/samba/branches/SAMBA_4_0
+</pre>
+Then configure and compile it as usual.<br>
+The particular tests that are helpful for cluster benchmarking are the RAW-BENCH-OPEN, RAW-BENCH-LOCK and BENCH-NBENCH tests.<br>
+These tests take a unclist that allows you to spread the workload out over more than one node. For example:
+
+<pre>
+  smbtorture //localhost/data -Uuser%password  RAW-BENCH-LOCK --unclist=unclist.txt --num-progs=32 -t60
+</pre>
+
+The file unclist.txt should contain a list of server names in your cluster prefixed by //. For example
+<pre>
+ //192.168.1.1
+ //192.168.1.2
+ //192.168.2.1
+ //192.168.2.2
+</pre>
+
+For NBENCH testing you need a client.txt file.<br>
+A suitable file can be found in the dbench distribution at http://samba.org/ftp/tridge/dbench/
+
+
+<h3>CTDB_MANAGES_SAMBA</h3>
+This is a parameter in /etc/sysconfig/ctdb<br><br>
+When this parameter is set to "yes" CTDB will start/stop/restart the localo samba daemon as the cluster configuration changes.<br><br>
+When this parameter is set you should also make sure that samba is NOT started by default by the linux system when it boots:
+<pre>
+  chkconfig samba off
+</pre>
+
+Example:
+<pre>
+  CTDB_MANAGES_SAMBA="yes"
+</pre>
+
+It is strongly recommended that you set this parameter to "yes" if you intend to use clustered samba.
+
+<!--#include virtual="footer.html" -->
+