summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-01-22 11:57:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:43:59 -0500
commit69d475223db98d0caa2e235e917e2798067c25ff (patch)
tree5e6806ccbfeed4add66c02b2d4b422a39963f4e1 /source4
parent87df5a631200a5725618fbe2779ade7066ad084c (diff)
downloadsamba-69d475223db98d0caa2e235e917e2798067c25ff.tar.gz
samba-69d475223db98d0caa2e235e917e2798067c25ff.tar.bz2
samba-69d475223db98d0caa2e235e917e2798067c25ff.zip
r20948: a very simple example on how to setup and test ctdb
(This used to be commit 8b5d7d66c91d2bee971373f7da05d1641c556cbc)
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/cluster/ctdb/example/cluster_start.sh12
-rw-r--r--source4/cluster/ctdb/example/howto.txt19
-rw-r--r--source4/cluster/ctdb/example/nlist.txt2
-rw-r--r--source4/cluster/ctdb/example/smb.conf.cluster26
-rw-r--r--source4/cluster/ctdb/example/smb.conf.node16
-rw-r--r--source4/cluster/ctdb/example/smb.conf.node26
-rw-r--r--source4/cluster/ctdb/example/unclist.txt2
7 files changed, 73 insertions, 0 deletions
diff --git a/source4/cluster/ctdb/example/cluster_start.sh b/source4/cluster/ctdb/example/cluster_start.sh
new file mode 100755
index 0000000000..575d031c95
--- /dev/null
+++ b/source4/cluster/ctdb/example/cluster_start.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+killall smbd
+sleep 1
+killall -9 smbd
+killall -9 valgrind
+
+type=$1
+
+xterm -e $type bin/smbd -s /home/tridge/samba/samba4.svn/prefix/etc/smb.conf.node1 -M single -i &
+xterm -e $type bin/smbd -s /home/tridge/samba/samba4.svn/prefix/etc/smb.conf.node2 -M single -i &
+
diff --git a/source4/cluster/ctdb/example/howto.txt b/source4/cluster/ctdb/example/howto.txt
new file mode 100644
index 0000000000..1de50000c1
--- /dev/null
+++ b/source4/cluster/ctdb/example/howto.txt
@@ -0,0 +1,19 @@
+Here is a very brief howto for setting up a simple test of the current
+ctdb code.
+
+1) put smb.conf.cluster, smb.conf.node1, smb.conf.node2 and nlist.txt in the
+ prefix/etc/ directory for samba4. Adjust them for your local paths.
+
+2) use the script cluster_start.sh to start the two nodes. You can
+ pass extra arguments to start under valgrind or gdb. For example:
+
+ cluster_start.sh "gdb --args"
+
+3) test using the following command:
+
+ bin/locktest //localhost/test //win2003/test -Uadministrator%password -l unclist.txt
+
+ with the unclist.txt supplied
+
+NOTE: This is very much experimental code!
+
diff --git a/source4/cluster/ctdb/example/nlist.txt b/source4/cluster/ctdb/example/nlist.txt
new file mode 100644
index 0000000000..e1198b59ac
--- /dev/null
+++ b/source4/cluster/ctdb/example/nlist.txt
@@ -0,0 +1,2 @@
+127.0.0.1:9001
+127.0.0.2:9001
diff --git a/source4/cluster/ctdb/example/smb.conf.cluster b/source4/cluster/ctdb/example/smb.conf.cluster
new file mode 100644
index 0000000000..a19b5eb110
--- /dev/null
+++ b/source4/cluster/ctdb/example/smb.conf.cluster
@@ -0,0 +1,26 @@
+ ctdb:shared data = /home/tridge/samba/samba4.svn/prefix/cluster
+ ctdb:maxlacount = 7
+ ctdb:brlock = true
+; ctdb:selfconnect = true
+ ctdb:nlist = /home/tridge/samba/samba4.svn/prefix/etc/nlist.txt
+ dos charset = ascii
+ unix charset = utf8
+ display charset = utf8
+ netbios name = blu
+ workgroup = bludom
+ realm = bludom.tridgell.net
+ panic action = backtrace %PID% %PROG%
+ js include = /home/tridge/samba/samba4.svn/source/scripting/libjs
+ setup directory = /home/tridge/samba/samba4.svn/source/setup
+ tls enabled = yes
+ server role = domain controller
+ posix:sharedelay = 100000
+ server services = smb
+ bind interfaces only = true
+ name resolve order = bcast
+ smb ports = 445
+
+[test]
+ ntvfs handler = unixuid posix
+ path = /home/tridge/prefix/testdir
+ read only = No
diff --git a/source4/cluster/ctdb/example/smb.conf.node1 b/source4/cluster/ctdb/example/smb.conf.node1
new file mode 100644
index 0000000000..c190d4f3e6
--- /dev/null
+++ b/source4/cluster/ctdb/example/smb.conf.node1
@@ -0,0 +1,6 @@
+ctdb:address = 127.0.0.1:9001
+interfaces = lo
+log file = /home/tridge/samba/samba4.svn/prefix/var/log.node1
+pid directory = /home/tridge/samba/samba4.svn/prefix/var/run/node1
+lock directory = /home/tridge/samba/samba4.svn/prefix/var/run/locks/node1
+include = /home/tridge/samba/samba4.svn/prefix/etc/smb.conf.cluster
diff --git a/source4/cluster/ctdb/example/smb.conf.node2 b/source4/cluster/ctdb/example/smb.conf.node2
new file mode 100644
index 0000000000..ea717139b4
--- /dev/null
+++ b/source4/cluster/ctdb/example/smb.conf.node2
@@ -0,0 +1,6 @@
+ctdb:address = 127.0.0.2:9001
+interfaces = lo:2
+log file = /home/tridge/samba/samba4.svn/prefix/var/log.node2
+pid directory = /home/tridge/samba/samba4.svn/prefix/var/run/node2
+lock directory = /home/tridge/samba/samba4.svn/prefix/var/run/locks/node1
+include = /home/tridge/samba/samba4.svn/prefix/etc/smb.conf.cluster
diff --git a/source4/cluster/ctdb/example/unclist.txt b/source4/cluster/ctdb/example/unclist.txt
new file mode 100644
index 0000000000..22afd6074b
--- /dev/null
+++ b/source4/cluster/ctdb/example/unclist.txt
@@ -0,0 +1,2 @@
+\\127.0.0.1\test
+\\127.0.0.2\test