source: vendor/current/ctdb/web/samba.html

Last change on this file was 988, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.3

File size: 3.1 KB
Line 
1<!--#set var="TITLE" value="CTDB and Samba" -->
2<!--#include virtual="header.html" -->
3
4<h1>Setting up clustered samba</h1>
5
6It is assumed tou have already installed the ctdb version of samba and also installed, configured and tested CTDB.
7
8<h2>Create a user account</h2>
9
10First you need to initialise the Samba password database so that you have some user that can authenticate to the samba service.<br>
11Do this by running:
12<pre>
13 smbpasswd -a root
14</pre>
15
16Samba 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>
17The rest of the configuration of Samba is exactly as it is done on a normal system.<br><br>
18See the docs on http://samba.org/ for details.
19
20<h2>Critical smb.conf parameters</h2>
21
22A clustered Samba install must set some specific configuration parameters
23<pre>
24 clustering = yes
25 idmap backend = tdb2
26</pre>
27
28<h2>Using smbcontrol</h2>
29
30You can check for connectivity to the smbd daemons on each node using smbcontrol
31<pre>
32 smbcontrol smbd ping
33</pre>
34
35<h2>Using Samba4 smbtorture</h2>
36
37The Samba4 version of smbtorture has several tests that can be used to
38benchmark a CIFS cluster. You can download Samba 4 from Samba website.
39
40The particular tests that are helpful for cluster benchmarking are the RAW-BENCH-OPEN, RAW-BENCH-LOCK and BENCH-NBENCH tests.<br>
41These tests take a unclist that allows you to spread the workload out over more than one node. For example:
42
43<pre>
44 smbtorture //localhost/data -Uuser%password RAW-BENCH-LOCK --unclist=unclist.txt --num-progs=32 -t60
45</pre>
46
47The file unclist.txt should contain a list of server names in your cluster prefixed by //. For example
48<pre>
49 //192.168.1.1
50 //192.168.1.2
51 //192.168.2.1
52 //192.168.2.2
53</pre>
54
55For NBENCH testing you need a client.txt file.<br>
56A suitable file can be found in the dbench distribution at http://samba.org/ftp/tridge/dbench/
57
58
59<h3>CTDB_MANAGES_SAMBA</h3>
60This is a parameter in /etc/sysconfig/ctdb<br><br>
61When this parameter is set to "yes" CTDB will start/stop/restart the local samba daemon as the cluster configuration changes.<br><br>
62When this parameter is set you should also make sure that samba is NOT started by default by the linux system when it boots, e.g.
63<pre>
64 chkconfig smb off
65</pre>
66on a Redhat system and
67<pre>
68 chkconfig smb off
69 chkconfig nmb off
70</pre>
71on a SuSE system.
72
73Example:
74<pre>
75 CTDB_MANAGES_SAMBA="yes"
76</pre>
77
78It is strongly recommended that you set this parameter to "yes" if you intend to use clustered samba.
79
80<h3>CTDB_MANAGES_WINBIND</h3>
81This is a parameter in /etc/sysconfig/ctdb<br><br>
82When this parameter is set to "yes" CTDB will start/stop/restart the local winbind daemon as the cluster configuration changes.<br><br>
83When this parameter is set you should also make sure that winbind is NOT started by default by the linux system when it boots:
84<pre>
85 chkconfig winbind off
86</pre>
87
88Example:
89<pre>
90 CTDB_MANAGES_WINBIND="yes"
91</pre>
92
93It is strongly recommended that you set this parameter to "yes" if you
94intend to use clustered samba in DOMAIN or ADS security mode.
95
96<!--#include virtual="footer.html" -->
97
Note: See TracBrowser for help on using the repository browser.