]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
documentation updates
authorRonnie Sahlberg <sahlberg@ronnie>
Fri, 14 Sep 2007 04:19:12 +0000 (14:19 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Fri, 14 Sep 2007 04:19:12 +0000 (14:19 +1000)
it is --event-script-dir      not --event-script

add explanation of the public_addresses file

(This used to be ctdb commit 21325b23e786ac1c2abc07ea75b0814e9c725a9e)

ctdb/doc/ctdbd.1
ctdb/doc/ctdbd.1.html
ctdb/doc/ctdbd.1.xml
ctdb/web/configuring.html

index ac83b3944a0620c1a2f5c4b914427c9b76df2991..5d056355826945bb094f5d23a57a7471f900a176 100644 (file)
@@ -1,11 +1,11 @@
 .\"     Title: ctdbd
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 09/03/2007
+.\"      Date: 09/14/2007
 .\"    Manual: 
 .\"    Source: 
 .\"
-.TH "CTDBD" "1" "09/03/2007" "" ""
+.TH "CTDBD" "1" "09/14/2007" "" ""
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
@@ -16,7 +16,7 @@ ctdbd \- The CTDB cluster daemon
 .HP 6
 \fBctdbd\fR
 .HP 6
-\fBctdbd\fR {\-\-reclock=<filename>} {\-\-nlist=<filename>} {\-\-dbdir=<directory>} [\-?\ \-\-help] [\-\-usage] [\-i\ \-\-interactive] [\-\-public\-addresses=<filename>] [\-\-event\-script=<filename>] [\-\-logfile=<filename>] [\-\-listen=<address>] [\-\-transport=<STRING>] [\-\-socket=<filename>] [\-d\ \-\-debug=<INTEGER>] [\-\-torture]
+\fBctdbd\fR {\-\-reclock=<filename>} {\-\-nlist=<filename>} {\-\-dbdir=<directory>} [\-?\ \-\-help] [\-\-usage] [\-i\ \-\-interactive] [\-\-public\-addresses=<filename>] [\-\-event\-script\-dir=<directory>] [\-\-logfile=<filename>] [\-\-listen=<address>] [\-\-transport=<STRING>] [\-\-socket=<filename>] [\-d\ \-\-debug=<INTEGER>] [\-\-torture]
 .SH "DESCRIPTION"
 .PP
 ctdbd is the main ctdb daemon.
@@ -66,16 +66,16 @@ By default ctdbd will detach itself from the shell and run in the background as
 .PP
 \-\-public_addresses=<filename>
 .RS 3n
-When used with IP takeover this specifies a file containing the public ip addresses to use on the cluster. This file contains a list of ip addresses netmasks and interfaces. When ctdb is operational it iwll distribute these public ip addresses evenly across the availabel nodes.
+When used with IP takeover this specifies a file containing the public ip addresses to use on the cluster. This file contains a list of ip addresses netmasks and interfaces. When ctdb is operational it will distribute these public ip addresses evenly across the available nodes.
 .sp
 This is usually the file /etc/ctdb/public_addresses
 .RE
 .PP
-\-\-event\-script=<filename>
+\-\-event\-script\-dir=<directory>
 .RS 3n
-This option is used to specify which events script that ctdbd will use to manage services when the cluster configuration changes.
+This option is used to specify the directory where the CTDB event scripts are stored.
 .sp
-This will normally be /etc/ctdb/events which is part of the ctdb distribution.
+This will normally be /etc/ctdb/events.d which is part of the ctdb distribution.
 .RE
 .PP
 \-\-logfile=<filename>
@@ -122,11 +122,11 @@ When used for ip takeover in a HA environment, each node in a ctdb cluster has m
 .PP
 This is the physical ip address of the node which is configured in linux and attached to a physical interface. This address uniquely identifies a physical node in the cluster and is the ip addresses that ctdbd will use to communicate with the ctdbd daemons on the other nodes in the cluster.
 .PP
-The private addresses are configured in /etc/ctdb/nodes (unless the \-\-nlist option is used) and contain one line for each node in the cluster. Each line contains the private ip address for one node in the cluster.
-.PP
-Each node is assigned an internal node number which corresponds to which line in the nodes file that has the local private address of the node.
+The private addresses are configured in /etc/ctdb/nodes (unless the \-\-nlist option is used) and contain one line for each node in the cluster. Each line contains the private ip address for one node in the cluster. This file must be the same on all nodes in the cluster.
 .PP
 Since the private addresses are only available to the network when the corresponding node is up and running you should not use these addresses for clients to connect to services provided by the cluster. Instead client applications should only attach to the public addresses since these are guaranteed to always be available.
+.PP
+When using ip takeover, it is strongly recommended that the private addresses are configured on a private network physically separated from the rest of the network and that this private network is dedicated to CTDB traffic.
 
       Example /etc/ctdb/nodes for a four node cluster:
       
@@ -142,15 +142,15 @@ Since the private addresses are only available to the network when the correspon
 .RE
 .SS "Public address"
 .PP
-A public address on the other hand is not attached to an interface. This address is managed by ctdbd itself and is attached/detached to a physical node at runtime. You should NOT have this address configured to an interface in linux. Let ctdbd manage these addresses.
+A public address on the other hand is not attached to an interface. This address is managed by ctdbd itself and is attached/detached to a physical node at runtime.
 .PP
-The ctdb cluster will assign/reassign these public addresses across the available healthy nodes in the cluster. When one node fails, its public address will be migrated to and taken over by a different node in the cluster to ensure that all public addresses are always available to clients.
+The ctdb cluster will assign/reassign these public addresses across the available healthy nodes in the cluster. When one node fails, its public address will be migrated to and taken over by a different node in the cluster to ensure that all public addresses are always available to clients as long as there are still nodes available capable of hosting this address.
 .PP
 These addresses are not physically attached to a specific node. The 'ctdb ip' command can be used to view the current assignment of public addresses and which physical node is currently serving it.
 .PP
-The list of public addresses also contain the netmask and the interface where this address should be attached.
+On each node this file contains a list of the public addresses that this node is capable of hosting. The list also contain the netmask and the interface where this address should be attached for the case where you may want to serve data out through multiple different interfaces.
 
-      Example /etc/ctdb/public_addresses for a four node cluster:
+      Example /etc/ctdb/public_addresses for a node that can host 4 public addresses:
       
 .sp
 .RS 3n
@@ -163,9 +163,35 @@ The list of public addresses also contain the netmask and the interface where th
 .fi
 .RE
 .PP
-In this example, two nodes in the cluster will serve 11.1.1.1 and 11.1.1.2 through interface eth0 and two (possibly other) nodes will serve 11.1.2.1 and 11.1.2.2 through eth1.
+In most cases this file would be the same on all nodes in a cluster but there are exceptions when one may want to use different files on different nodes.
+
+       Example: 4 nodes partitioned into two subgroups :
+       
+.sp
+.RS 3n
+.nf
+       Node 0:/etc/ctdb/public_addresses
+               10.1.1.1/24 eth0
+               10.1.1.2/24 eth0
+
+       Node 1:/etc/ctdb/public_addresses
+               10.1.1.1/24 eth0
+               10.1.1.2/24 eth0
+
+       Node 2:/etc/ctdb/public_addresses
+               10.2.1.1/24 eth0
+               10.2.1.2/24 eth0
+
+       Node 3:/etc/ctdb/public_addresses
+               10.2.1.1/24 eth0
+               10.2.1.2/24 eth0
+       
+.fi
+.RE
+.PP
+In this example nodes 0 and 1 host two public addresses on the 10.1.1.x network while nodes 2 and 3 host two public addresses for the 10.2.1.x network.
 .PP
-The public address file must be the same on all nodes. Since this file also specifies which interface the address should be attached to it is imporant that all nodes use the same naming convention for interfaces.
+Ip address 10.1.1.1 can be hosted by either of nodes 0 or 1 and will be available to clients as long as at least one of these two nodes are available. If both nodes 0 and node 1 become unavailable 10.1.1.1 also becomes unavailable. 10.1.1.1 can not be failed over to node 2 or node 3 since these nodes do not have this ip address listed in their public addresses file.
 .SH "NODE STATUS"
 .PP
 The current status of each node in the cluster can be viewed by the 'ctdb status' command.
index b600785f8911f9d393f5c15798fac6530f95d60b..8a5059e7301eda01d0162754573821782c69312c 100644 (file)
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ctdbd</title><meta name="generator" content="DocBook XSL Stylesheets V1.71.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="ctdbd.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ctdbd &#8212; The CTDB cluster daemon</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ctdbd</code> </p></div><div class="cmdsynopsis"><p><code class="command">ctdbd</code>  {--reclock=&lt;filename&gt;} {--nlist=&lt;filename&gt;} {--dbdir=&lt;directory&gt;} [-? --help] [--usage] [-i --interactive] [--public-addresses=&lt;filename&gt;] [--event-script=&lt;filename&gt;] [--logfile=&lt;filename&gt;] [--listen=&lt;address&gt;] [--transport=&lt;STRING&gt;] [--socket=&lt;filename&gt;] [-d --debug=&lt;INTEGER&gt;] [--torture]</p></div></div><div class="refsect1" lang="en"><a name="id2480886"></a><h2>DESCRIPTION</h2><p>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ctdbd</title><meta name="generator" content="DocBook XSL Stylesheets V1.71.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="ctdbd.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ctdbd &#8212; The CTDB cluster daemon</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ctdbd</code> </p></div><div class="cmdsynopsis"><p><code class="command">ctdbd</code>  {--reclock=&lt;filename&gt;} {--nlist=&lt;filename&gt;} {--dbdir=&lt;directory&gt;} [-? --help] [--usage] [-i --interactive] [--public-addresses=&lt;filename&gt;] [--event-script-dir=&lt;directory&gt;] [--logfile=&lt;filename&gt;] [--listen=&lt;address&gt;] [--transport=&lt;STRING&gt;] [--socket=&lt;filename&gt;] [-d --debug=&lt;INTEGER&gt;] [--torture]</p></div></div><div class="refsect1" lang="en"><a name="id2480886"></a><h2>DESCRIPTION</h2><p>
       ctdbd is the main ctdb daemon.
     </p><p>
       ctdbd provides a clustered version of the TDB database with automatic rebuild/recovery of the databases upon nodefailures.
             By default ctdbd will detach itself from the shell and run in
             the background as a daemon. This option makes ctdbd to start in interactive mode.
           </p></dd><dt><span class="term">--public_addresses=&lt;filename&gt;</span></dt><dd><p>
-            When used with IP takeover this specifies a file containing the public ip addresses to use on the cluster. This file contains a list of ip addresses netmasks and interfaces. When ctdb is operational it iwll distribute these public ip addresses evenly across the availabel nodes.
+            When used with IP takeover this specifies a file containing the public ip addresses to use on the cluster. This file contains a list of ip addresses netmasks and interfaces. When ctdb is operational it will distribute these public ip addresses evenly across the available nodes.
           </p><p>
             This is usually the file /etc/ctdb/public_addresses
-          </p></dd><dt><span class="term">--event-script=&lt;filename&gt;</span></dt><dd><p>
-            This option is used to specify which events script that ctdbd will
-            use to manage services when the cluster configuration changes.
+          </p></dd><dt><span class="term">--event-script-dir=&lt;directory&gt;</span></dt><dd><p>
+            This option is used to specify the directory where the CTDB event
+           scripts are stored.
           </p><p>
-            This will normally be /etc/ctdb/events which is part of the ctdb distribution.
+            This will normally be /etc/ctdb/events.d which is part of the ctdb distribution.
           </p></dd><dt><span class="term">--logfile=&lt;filename&gt;</span></dt><dd><p>
             This is the file where ctdbd will write its log. This is usually /var/log/log.ctdb .
           </p></dd><dt><span class="term">--listen=&lt;address&gt;</span></dt><dd><p>
             This option is only used for development and testing of ctdbd. It adds artificial errors and failures to the common codepaths in ctdbd to verify that ctdbd can recover correctly for failures.
           </p><p>
             You do NOT want to use this option unless you are developing and testing new functionality in ctdbd.
-          </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2528418"></a><h2>Private vs Public addresses</h2><p>
+          </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2528417"></a><h2>Private vs Public addresses</h2><p>
       When used for ip takeover in a HA environment, each node in a ctdb 
       cluster has multiple ip addresses assigned to it. One private and one or more public.
-    </p><div class="refsect2" lang="en"><a name="id2528428"></a><h3>Private address</h3><p>
+    </p><div class="refsect2" lang="en"><a name="id2528427"></a><h3>Private address</h3><p>
         This is the physical ip address of the node which is configured in 
         linux and attached to a physical interface. This address uniquely
         identifies a physical node in the cluster and is the ip addresses
         The private addresses are configured in /etc/ctdb/nodes 
         (unless the --nlist option is used) and contain one line for each 
         node in the cluster. Each line contains the private ip address for one
-        node in the cluster.
-      </p><p>
-        Each node is assigned an internal node number which corresponds to 
-        which line in the nodes file that has the local private address
-        of the node.
+        node in the cluster. This file must be the same on all nodes in the
+       cluster.
       </p><p>
         Since the private addresses are only available to the network when the
         corresponding node is up and running you should not use these addresses
         for clients to connect to services provided by the cluster. Instead
         client applications should only attach to the public addresses since
         these are guaranteed to always be available.
+      </p><p>
+        When using ip takeover, it is strongly recommended that the private 
+       addresses are configured on a private network physically separated
+       from the rest of the network and that this private network is dedicated
+       to CTDB traffic.
       </p>
       Example /etc/ctdb/nodes for a four node cluster:
       <pre class="screen">
         10.1.1.2
         10.1.1.3
         10.1.1.4
-      </pre></div><div class="refsect2" lang="en"><a name="id2528475"></a><h3>Public address</h3><p>
+      </pre></div><div class="refsect2" lang="en"><a name="id2528476"></a><h3>Public address</h3><p>
         A public address on the other hand is not attached to an interface.
         This address is managed by ctdbd itself and is attached/detached to
-        a physical node at runtime. You should NOT have this address configured
-        to an interface in linux. Let ctdbd manage these addresses.
+        a physical node at runtime.
       </p><p>
         The ctdb cluster will assign/reassign these public addresses across the
         available healthy nodes in the cluster. When one node fails, its public address
         will be migrated to and taken over by a different node in the cluster
-        to ensure that all public addresses are always available to clients.
+        to ensure that all public addresses are always available to clients as 
+       long as there are still nodes available capable of hosting this address.
       </p><p>
         These addresses are not physically attached to a specific node. 
         The 'ctdb ip' command can be used to view the current assignment of 
         public addresses and which physical node is currently serving it.
       </p><p>
-        The list of public addresses also contain the netmask and the 
-       interface where this address should be attached.
+       On each node this file contains a list of the public addresses that 
+       this node is capable of hosting.
+        The list also contain the netmask and the 
+       interface where this address should be attached for the case where you
+       may want to serve data out through multiple different interfaces.
       </p>
-      Example /etc/ctdb/public_addresses for a four node cluster:
+      Example /etc/ctdb/public_addresses for a node that can host 4 public addresses:
       <pre class="screen">
         11.1.1.1/24 eth0
         11.1.1.2/24 eth0
         11.1.2.1/24 eth1
         11.1.2.2/24 eth1
       </pre><p>
-        In this example, two nodes in the cluster will serve 11.1.1.1 and 
-       11.1.1.2 through interface eth0  and two (possibly other) nodes will
-       serve 11.1.2.1 and 11.1.2.2 through eth1.
-      </p><p>
-        The public address file must be the same on all nodes.
-       Since this file also specifies which interface the address should be 
-       attached to it is imporant that all nodes use the same naming convention
-       for interfaces.
-      </p></div></div><div class="refsect1" lang="en"><a name="id2528534"></a><h2>Node status</h2><p>
+       In most cases this file would be the same on all nodes in a cluster but
+       there are exceptions when one may want to use different files
+       on different nodes.
+       </p>
+       Example: 4 nodes partitioned into two subgroups :
+       <pre class="screen">
+       Node 0:/etc/ctdb/public_addresses
+               10.1.1.1/24 eth0
+               10.1.1.2/24 eth0
+
+       Node 1:/etc/ctdb/public_addresses
+               10.1.1.1/24 eth0
+               10.1.1.2/24 eth0
+
+       Node 2:/etc/ctdb/public_addresses
+               10.2.1.1/24 eth0
+               10.2.1.2/24 eth0
+
+       Node 3:/etc/ctdb/public_addresses
+               10.2.1.1/24 eth0
+               10.2.1.2/24 eth0
+       </pre><p>
+       In this example nodes 0 and 1 host two public addresses on the 
+       10.1.1.x network  while nodes 2 and 3 host two public addresses for the 
+       10.2.1.x network.
+       </p><p>
+       Ip address 10.1.1.1 can be hosted by either of nodes 0 or 1 and will be
+       available to clients as long as at least one of these two nodes are
+       available.
+       If both nodes 0 and node 1 become unavailable 10.1.1.1 also becomes 
+       unavailable. 10.1.1.1 can not be failed over to node 2 or node 3 since
+       these nodes do not have this ip address listed in their public
+       addresses file.
+       </p></div></div><div class="refsect1" lang="en"><a name="id2528564"></a><h2>Node status</h2><p>
       The current status of each node in the cluster can be viewed by the 
       'ctdb status' command.
     </p><p>
       investigated and require an administrative action to rectify. This node 
       does not perticipate in the CTDB cluster but can still be communicated 
       with. I.e. ctdb commands can be sent to it.
-    </p></div><div class="refsect1" lang="en"><a name="id2528591"></a><h2>SEE ALSO</h2><p>
+    </p></div><div class="refsect1" lang="en"><a name="id2528621"></a><h2>SEE ALSO</h2><p>
       ctdb(1), onnode(1)
       <a href="http://ctdb.samba.org/" target="_top">http://ctdb.samba.org/</a>
-    </p></div><div class="refsect1" lang="en"><a name="id2528604"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br>
+    </p></div><div class="refsect1" lang="en"><a name="id2528634"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br>
 Copyright (C) Andrew Tridgell 2007<br>
 Copyright (C) Ronnie sahlberg 2007<br>
 <br>
index fdda489a574d7f9101a6eac678deeebd6a8cab0e..1f052940a625f679c370c72841347da3d4e325f6 100644 (file)
@@ -27,7 +27,7 @@
                <arg choice="opt">--usage</arg>
                <arg choice="opt">-i --interactive</arg>
                <arg choice="opt">--public-addresses=&lt;filename&gt;</arg>
-               <arg choice="opt">--event-script=&lt;filename&gt;</arg>
+               <arg choice="opt">--event-script-dir=&lt;directory&gt;</arg>
                <arg choice="opt">--logfile=&lt;filename&gt;</arg>
                <arg choice="opt">--listen=&lt;address&gt;</arg>
                <arg choice="opt">--transport=&lt;STRING&gt;</arg>
       <varlistentry><term>--public_addresses=&lt;filename&gt;</term>
         <listitem>
           <para>
-            When used with IP takeover this specifies a file containing the public ip addresses to use on the cluster. This file contains a list of ip addresses netmasks and interfaces. When ctdb is operational it iwll distribute these public ip addresses evenly across the availabel nodes.
+            When used with IP takeover this specifies a file containing the public ip addresses to use on the cluster. This file contains a list of ip addresses netmasks and interfaces. When ctdb is operational it will distribute these public ip addresses evenly across the available nodes.
           </para>
           <para>
             This is usually the file /etc/ctdb/public_addresses
         </listitem>
       </varlistentry>
 
-      <varlistentry><term>--event-script=&lt;filename&gt;</term>
+      <varlistentry><term>--event-script-dir=&lt;directory&gt;</term>
         <listitem>
           <para>
-            This option is used to specify which events script that ctdbd will
-            use to manage services when the cluster configuration changes.
+            This option is used to specify the directory where the CTDB event
+           scripts are stored.
           </para>
           <para>
-            This will normally be /etc/ctdb/events which is part of the ctdb distribution.
+            This will normally be /etc/ctdb/events.d which is part of the ctdb distribution.
           </para>
         </listitem>
       </varlistentry>
         The private addresses are configured in /etc/ctdb/nodes 
         (unless the --nlist option is used) and contain one line for each 
         node in the cluster. Each line contains the private ip address for one
-        node in the cluster.
-      </para>
-      <para>
-        Each node is assigned an internal node number which corresponds to 
-        which line in the nodes file that has the local private address
-        of the node.
+        node in the cluster. This file must be the same on all nodes in the
+       cluster.
       </para>
       <para>
         Since the private addresses are only available to the network when the
         client applications should only attach to the public addresses since
         these are guaranteed to always be available.
       </para>
+      <para>
+        When using ip takeover, it is strongly recommended that the private 
+       addresses are configured on a private network physically separated
+       from the rest of the network and that this private network is dedicated
+       to CTDB traffic.
+      </para>
       Example /etc/ctdb/nodes for a four node cluster:
       <screen format="linespecific">
         10.1.1.1
       <para>
         A public address on the other hand is not attached to an interface.
         This address is managed by ctdbd itself and is attached/detached to
-        a physical node at runtime. You should NOT have this address configured
-        to an interface in linux. Let ctdbd manage these addresses.
+        a physical node at runtime.
       </para>
       <para>
         The ctdb cluster will assign/reassign these public addresses across the
         available healthy nodes in the cluster. When one node fails, its public address
         will be migrated to and taken over by a different node in the cluster
-        to ensure that all public addresses are always available to clients.
+        to ensure that all public addresses are always available to clients as 
+       long as there are still nodes available capable of hosting this address.
       </para>
       <para>
         These addresses are not physically attached to a specific node. 
         public addresses and which physical node is currently serving it.
       </para>
       <para>
-        The list of public addresses also contain the netmask and the 
-       interface where this address should be attached.
+       On each node this file contains a list of the public addresses that 
+       this node is capable of hosting.
+        The list also contain the netmask and the 
+       interface where this address should be attached for the case where you
+       may want to serve data out through multiple different interfaces.
       </para>
-      Example /etc/ctdb/public_addresses for a four node cluster:
+      Example /etc/ctdb/public_addresses for a node that can host 4 public addresses:
       <screen format="linespecific">
         11.1.1.1/24 eth0
         11.1.1.2/24 eth0
         11.1.2.1/24 eth1
         11.1.2.2/24 eth1
       </screen>
-      <para>
-        In this example, two nodes in the cluster will serve 11.1.1.1 and 
-       11.1.1.2 through interface eth0  and two (possibly other) nodes will
-       serve 11.1.2.1 and 11.1.2.2 through eth1.
-      </para>
-      <para>
-        The public address file must be the same on all nodes.
-       Since this file also specifies which interface the address should be 
-       attached to it is imporant that all nodes use the same naming convention
-       for interfaces.
-      </para>
+
+       <para>
+       In most cases this file would be the same on all nodes in a cluster but
+       there are exceptions when one may want to use different files
+       on different nodes.
+       </para>
+       Example: 4 nodes partitioned into two subgroups :
+       <screen format="linespecific">
+       Node 0:/etc/ctdb/public_addresses
+               10.1.1.1/24 eth0
+               10.1.1.2/24 eth0
+
+       Node 1:/etc/ctdb/public_addresses
+               10.1.1.1/24 eth0
+               10.1.1.2/24 eth0
+
+       Node 2:/etc/ctdb/public_addresses
+               10.2.1.1/24 eth0
+               10.2.1.2/24 eth0
+
+       Node 3:/etc/ctdb/public_addresses
+               10.2.1.1/24 eth0
+               10.2.1.2/24 eth0
+       </screen>
+       <para>
+       In this example nodes 0 and 1 host two public addresses on the 
+       10.1.1.x network  while nodes 2 and 3 host two public addresses for the 
+       10.2.1.x network.
+       </para>
+       <para>
+       Ip address 10.1.1.1 can be hosted by either of nodes 0 or 1 and will be
+       available to clients as long as at least one of these two nodes are
+       available.
+       If both nodes 0 and node 1 become unavailable 10.1.1.1 also becomes 
+       unavailable. 10.1.1.1 can not be failed over to node 2 or node 3 since
+       these nodes do not have this ip address listed in their public
+       addresses file.
+       </para>
     </refsect2>
   </refsect1>
 
index ffc605ffc27c5081043b83687be77c226dad9287..f91cd4519a82b4484d6fd355a30f2e301cd0f706 100644 (file)
@@ -83,17 +83,15 @@ The default for this file is /etc/ctdb/nodes.
 
 <h3>CTDB_PUBLIC_ADDRESSES</h3>
 
-This file specifies a list of public ip addresses which the cluster will 
-serve. This file must be the same on all nodes.<p>
+Each node in a CTDB cluster contains a list of public addresses which that 
+particular node can host.<p>
 
+While running the CTDB cluster will assign each public address that exists in the entire cluster to one node that will host that public address.<p>
 
 These are the addresses that the SMBD daemons and other services will
-bind to and which clients will use to connect to the cluster. This
-file must contain one address for each node, i.e. it must have the
-same number of entries as the nodes file. This file must also be the
-same for all nodes in the cluster.<p>
+bind to and which clients will use to connect to the cluster.<p>
 
-Example 4 node cluster:
+<h3>Example 4 node cluster:</h3>
 <pre>
   CTDB_PUBLIC_ADDRESSES=/etc/ctdb/public_addresses
 </pre>
@@ -118,8 +116,7 @@ The CTDB cluster utilizes IP takeover techniques to ensure that as long as at le
 This means that if one physical node fails, the public addresses that
 node was serving will be taken over by a different node in the cluster. This
 provides a guarantee that all ip addresses exposed to clients will
-always be reachable by clients even if a node has been powered off or
-has crashed.<p>
+always be reachable by clients as long as at least one node still remains available in the cluster with the capability to host that public address (i.e. the public address exists in that nodes public_addresses file).
 
 Do not assign these addresses to any of the interfaces on the
 host. CTDB will add and remove these addresses automatically at
@@ -127,7 +124,35 @@ runtime.<p>
 
 This parameter is used when CTDB operated in takeover ip mode.<p>
 
-The usual location for this file is /etc/ctdb/public_addresses.
+The usual location for this file is /etc/ctdb/public_addresses.<p><p>
+
+<h3>Example 2:</h3>
+By using different public_addresses files on different nodes it is possible to 
+partition the cluster into subsets of nodes.
+
+<pre>
+Node 0 : /etc/ctdb/public_addresses
+10.1.1.1/24 eth0
+10.1.2.1/24 eth1
+</pre>
+
+<pre>
+Node 1 : /etc/ctdb/public_addresses
+10.1.2.1/24 eth1
+10.1.3.1/24 eth2
+</pre>
+
+<pre>
+Node 2 : /etc/ctdb/public_addresses
+10.1.3.2/24 eth2
+</pre>
+
+In this example we have three nodes but a total of 4 public addresses.<p>
+
+10.1.2.1 can be hosted by either node 0 or node 1 and will be available to clients as long as at least one of these nodes are available. Only if both nodes 0 and 1 fails will this public address become unavailable to clients.<p>
+
+All other public addresses can only be served by one single node respectively and will therefore only be avialable if the respective node is also available.
+
 
 <h2>Event scripts</h2>