nicer onnode output
authorAndrew Tridgell <tridge@samba.org>
Mon, 7 Jan 2008 03:31:13 +0000 (14:31 +1100)
committerAndrew Tridgell <tridge@samba.org>
Mon, 7 Jan 2008 03:31:13 +0000 (14:31 +1100)
config/ctdb.sysconfig
config/events.d/50.samba
doc/ctdbd.1.xml
packaging/RPM/ctdb.spec
server/ctdb_recover.c
tools/ctdb_diagnostics
tools/onnode.rsh
tools/onnode.ssh

index a4dac0afb13847871672ef3b78914d0726b6dff2..9306884b642bb542b447689ccb2955101ce8a2da 100644 (file)
 #
 # CTDB_PUBLIC_ADDRESSES=/etc/ctdb/public_addresses
 
+# Should CTDB present the cluster using a single public ip address to clients
+# and multiplex clients across all CONNECTED nodes ?
+# This is based on LVS 
+# When this is enabled, the entire cluster will present one single ip address
+# which clients will connect to.
+# CTDB_LVS_PUBLIC_IP=10.1.1.1
+
+
+# IPMUX : OBSOLETE use LVS instead
 # Should ctdb implement a single public ip address across the entire cluster
 # and multiplex incoming connections across the connected nodes
 # When using a single public ip you must also specify the public interface!
index bdb351f667996615a190b001925ee897fc10c11f..1c7b79f5d9ce41696034566d0427f47e1b5fbfc4 100755 (executable)
@@ -46,14 +46,19 @@ case $cmd in
 
        # make sure samba is not already started
        service smb stop > /dev/null 2>&1
+       killall -0 -q smbd && {
+           sleep 1
+           # make absolutely sure samba is dead
+           killall -q -9 smbd
+       }
 
        # restart the winbind service
        [ "$CTDB_MANAGES_WINBIND" = "yes" ] && {
                service winbind stop > /dev/null 2>&1
-               killall -0 -q smbd winbindd && {
+               killall -0 -q winbindd && {
                    sleep 1
-                   # make absolutely sure samba is dead
-                   killall -q -9 smbd winbindd
+                   # make absolutely sure winbindd is dead
+                   killall -q -9 winbindd
                }
                service winbind start
        }
index 1f052940a625f679c370c72841347da3d4e325f6..67fc162c4feed78e8e106c0fb4eb3276e7234f98 100644 (file)
        
        <cmdsynopsis>
                <command>ctdbd</command>
-               <arg choice="req">--reclock=&lt;filename&gt;</arg>
-               <arg choice="req">--nlist=&lt;filename&gt;</arg>
-               <arg choice="req">--dbdir=&lt;directory&gt;</arg>
                <arg choice="opt">-? --help</arg>
-               <arg choice="opt">--usage</arg>
-               <arg choice="opt">-i --interactive</arg>
-               <arg choice="opt">--public-addresses=&lt;filename&gt;</arg>
+               <arg choice="opt">-d --debug=&lt;INTEGER&gt;</arg>
+               <arg choice="req">--dbdir=&lt;directory&gt;</arg>
+               <arg choice="req">--dbdir-persistent=&lt;directory&gt;</arg>
                <arg choice="opt">--event-script-dir=&lt;directory&gt;</arg>
-               <arg choice="opt">--logfile=&lt;filename&gt;</arg>
+               <arg choice="opt">-i --interactive</arg>
                <arg choice="opt">--listen=&lt;address&gt;</arg>
-               <arg choice="opt">--transport=&lt;STRING&gt;</arg>
+               <arg choice="opt">--logfile=&lt;filename&gt;</arg>
+               <arg choice="req">--nlist=&lt;filename&gt;</arg>
+               <arg choice="opt">--nosetsched</arg>
+               <arg choice="opt">--public-addresses=&lt;filename&gt;</arg>
+               <arg choice="opt">--public-interface=&lt;interface&gt;</arg>
+               <arg choice="req">--reclock=&lt;filename&gt;</arg>
+               <arg choice="opt">--single-public-ip=&lt;address&gt;</arg>
                <arg choice="opt">--socket=&lt;filename&gt;</arg>
-               <arg choice="opt">-d --debug=&lt;INTEGER&gt;</arg>
+               <arg choice="opt">--syslog</arg>
                <arg choice="opt">--torture</arg>
+               <arg choice="opt">--transport=&lt;STRING&gt;</arg>
+               <arg choice="opt">--usage</arg>
        </cmdsynopsis>
        
 </refsynopsisdiv>
         </listitem>
       </varlistentry>
 
-      <varlistentry><term>--usage</term>
+      <varlistentry><term>-d --debug=&lt;DEBUGLEVEL&gt;</term>
         <listitem>
           <para>
-            Print useage information to the screen.
+            This option sets the debuglevel on the ctdbd daemon which controls what will be written to the logfile. The default is 0 which will only log important events and errors. A larger number will provide additional logging.
           </para>
         </listitem>
       </varlistentry>
 
-      <varlistentry><term>--reclock=&lt;filename&gt;</term>
+      <varlistentry><term>--dbdir=&lt;directory&gt;</term>
         <listitem>
           <para>
-            This is the name of the lock file stored of the shared cluster filesystem that ctdbd uses to arbitrate which node has the role of recovery-master.
-            This file must be stored on shared storage.
+            This is the directory on local storage where ctdbd keeps the local
+            copy of the TDB databases. This directory is local for each node and should not be stored on the shared cluster filesystem.
+          </para>
+          <para>
+            This directory would usually be /var/ctdb .
           </para>
         </listitem>
       </varlistentry>
 
-      <varlistentry><term>--nlist=&lt;filename&gt;</term>
+      <varlistentry><term>--dbdir-persistent=&lt;directory&gt;</term>
         <listitem>
           <para>
-            This file contains a list of the private ip addresses of every node in the cluster. There is one line/ip address for each node. This file must be the same for all nodes in the cluster.
+            This is the directory on local storage where ctdbd keeps the local
+            copy of the persistent TDB databases. This directory is local for each node and should not be stored on the shared cluster filesystem.
           </para>
           <para>
-            This file is usually /etc/ctdb/nodes .
+            This directory would usually be /etc/ctdb/persistent .
           </para>
         </listitem>
       </varlistentry>
 
-      <varlistentry><term>--dbdir=&lt;directory&gt;</term>
+      <varlistentry><term>--event-script-dir=&lt;directory&gt;</term>
         <listitem>
           <para>
-            This is the directory on local storage where ctdbd keeps the local
-            copy of the TDB databases. This directory is local for each node and should not be stored on the shared cluster filesystem.
+            This option is used to specify the directory where the CTDB event
+           scripts are stored.
           </para>
           <para>
-            This directory would usually be /var/ctdb .
+            This will normally be /etc/ctdb/events.d which is part of the ctdb distribution.
           </para>
         </listitem>
       </varlistentry>
         </listitem>
       </varlistentry>
 
-      <varlistentry><term>--public_addresses=&lt;filename&gt;</term>
+      <varlistentry><term>--listen=&lt;address&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 will distribute these public ip addresses evenly across the available nodes.
+            This specifies which ip address ctdb will bind to. By default ctdbd will bind to the first address it finds in the /etc/ctdb/nodes file and which is also present on the local system in which case you do not need to provide this option.
           </para>
           <para>
-            This is usually the file /etc/ctdb/public_addresses
+            This option is only required when you want to run multiple ctdbd daemons/nodes on the same physical host in which case there would be multiple entries in /etc/ctdb/nodes what would match a local interface.
           </para>
         </listitem>
       </varlistentry>
 
-      <varlistentry><term>--event-script-dir=&lt;directory&gt;</term>
+      <varlistentry><term>--logfile=&lt;filename&gt;</term>
         <listitem>
           <para>
-            This option is used to specify the directory where the CTDB event
-           scripts are stored.
+            This is the file where ctdbd will write its log. This is usually /var/log/log.ctdb .
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--nlist=&lt;filename&gt;</term>
+        <listitem>
+          <para>
+            This file contains a list of the private ip addresses of every node in the cluster. There is one line/ip address for each node. This file must be the same for all nodes in the cluster.
           </para>
           <para>
-            This will normally be /etc/ctdb/events.d which is part of the ctdb distribution.
+            This file is usually /etc/ctdb/nodes .
           </para>
         </listitem>
       </varlistentry>
 
-      <varlistentry><term>--logfile=&lt;filename&gt;</term>
+      <varlistentry><term>--nosetsched</term>
         <listitem>
           <para>
-            This is the file where ctdbd will write its log. This is usually /var/log/log.ctdb .
+            Normally ctdb will change its scheduler to run as a real-time 
+           process. This option is used to change this behaviour and have
+           ctdb run as a normal process.
           </para>
         </listitem>
       </varlistentry>
 
-      <varlistentry><term>--listen=&lt;address&gt;</term>
+      <varlistentry><term>--public_addresses=&lt;filename&gt;</term>
         <listitem>
           <para>
-            This specifies which ip address ctdb will bind to. By default ctdbd will bind to the first address it finds in the /etc/ctdb/nodes file and which is also present on the local system in which case you do not need to provide this option.
+            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 option is only required when you want to run multiple ctdbd daemons/nodes on the same physical host in which case there would be multiple entries in /etc/ctdb/nodes what would match a local interface.
+            This is usually the file /etc/ctdb/public_addresses
           </para>
         </listitem>
       </varlistentry>
 
-      <varlistentry><term>--transport=&lt;STRING&gt;</term>
+      <varlistentry><term>--public_interface=&lt;interface&gt;</term>
         <listitem>
           <para>
-            This option specifies which transport to use for ctdbd internode communications. The default is "tcp".
+            This option tells ctdb which interface to attach public-addresses
+           to and also where to attach the single-public-ip when used.
           </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--reclock=&lt;filename&gt;</term>
+        <listitem>
           <para>
-            Suported transports are "tcp" and "infiniband".
+            This is the name of the lock file stored of the shared cluster filesystem that ctdbd uses to arbitrate which node has the role of recovery-master.
+            This file must be stored on shared storage.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--single-public-ip=&lt;address&gt;</term>
+        <listitem>
+          <para>
+            This option is used to activate the "ipmux" functionality of ctdb.
+            In this mode, all nodes of the cluster will expose a single
+            ip address from all nodes with all incoming traffic to the cluster
+            being passed through the current recmaster. This functionality
+            is similar to using a load-balancing switch.
+          </para>
+          <para>
+            All incoming packets are sent to the recmaster which will multiplex
+            the clients across all available nodes and pass the packets on to
+            a different node in the cluster to manage the connection based
+            on the clients ip address. Outgoing packets however are sent
+            directly from the node that was choosen back to the client.
+            Since all incoming packets are sent through the recmaster this will
+            have a throughput and performance impact when used. This impact
+            in performance primarily affects write-performance while 
+           read-performance should be mainly unaffected.
+            Only use this feature if your environment is mostly-read 
+            (i.e. most traffic is from the nodes back to the clients) or
+            if it is not important to get maximum write-performance to the
+           cluster.
+          </para>
+          <para>
+            When using a single public ip, you must also specify the 
+            public-interface so that ctdb knows which interface to attach the 
+            single public ip to.
           </para>
         </listitem>
       </varlistentry>
         </listitem>
       </varlistentry>
 
-      <varlistentry><term>-d --debug=&lt;DEBUGLEVEL&gt;</term>
+      <varlistentry><term>--syslog</term>
         <listitem>
           <para>
-            This option sets the debuglevel on the ctdbd daemon which controls what will be written to the logfile. The default is 0 which will only log important events and errors. A larger number will provide additional logging.
+           Send all log messages to syslog instead of to the ctdb logfile.
           </para>
         </listitem>
       </varlistentry>
           </para>
         </listitem>
       </varlistentry>
+
+      <varlistentry><term>--transport=&lt;STRING&gt;</term>
+        <listitem>
+          <para>
+            This option specifies which transport to use for ctdbd internode communications. The default is "tcp".
+          </para>
+          <para>
+            Suported transports are "tcp" and "infiniband".
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--usage</term>
+        <listitem>
+          <para>
+            Print useage information to the screen.
+          </para>
+        </listitem>
+      </varlistentry>
+
     </variablelist>
   </refsect1>
 
index 996ba185d015f66ae37b94117c1d20e020103532..d8fa622d36fc9c1b42b17af47cd643d7d77278fd 100644 (file)
@@ -101,6 +101,7 @@ fi
 %{_sysconfdir}/ctdb/events.d/60.nfs
 %{_sysconfdir}/ctdb/events.d/61.nfstickle
 %{_sysconfdir}/ctdb/events.d/90.ipmux
+%{_sysconfdir}/ctdb/events.d/91.lvs
 %{_sysconfdir}/ctdb/statd-callout
 %{_sbindir}/ctdbd
 %{_bindir}/ctdb
index 212a1ada7a8454eb69a3f02f4d57e51025c45786..637894dfd15c0c5c5d8abf954a7b9208b38d12a2 100644 (file)
@@ -225,7 +225,7 @@ int32_t ctdb_control_pull_db(struct ctdb_context *ctdb, TDB_DATA indata, TDB_DAT
        
        ctdb_db = find_ctdb_db(ctdb, pull->db_id);
        if (!ctdb_db) {
-               DEBUG(0,(__location__ " Unknown db\n"));
+               DEBUG(0,(__location__ " Unknown db 0x%08x\n", pull->db_id));
                return -1;
        }
 
index f302219398bfd5e7dd65ece9fb72b8b105871d52..9cabca1efe4d5f245cf630aa2c0f4492bc95820e 100755 (executable)
@@ -160,6 +160,7 @@ EOF
  show_all "/usr/lpp/mmfs/bin/mmlsconfig"
  show_all "/usr/lpp/mmfs/bin/mmlsfs all"
  show_all "/usr/lpp/mmfs/bin/mmlsnsd"
+ show_all "/usr/lpp/mmfs/bin/mmlsnsd -X"
  show_all "/usr/lpp/mmfs/bin/mmfsadm dump version"
  show_all "/usr/lpp/mmfs/bin/mmfsadm dump waiters"
  show_all "/usr/lpp/mmfs/bin/mmlsmount all"
index cdda3256f717580414e65d4b227d4ba39d9b1276..a92a12711d40f67ad36899ed7ddcfc936705971b 100644 (file)
@@ -19,6 +19,7 @@ MAXNODE=`expr $NUMNODES - 1`
 
 if [ $NODE = "all" ]; then
     for a in `egrep '^[[:alnum:]]' $NODES`; do
+       echo; echo ">> NODE: $a <<"
        if [ -f "$SCRIPT" ]; then
            rsh $a at -f $SCRIPT now
        else
index cb337b54b64a45e55fee98c5f17677aef9b5cec0..0658f0c36e4db5a8d6d05c9f56e06e7b8015a834 100755 (executable)
@@ -19,6 +19,7 @@ MAXNODE=`expr $NUMNODES - 1`
 
 if [ $NODE = "all" ]; then
     for a in `egrep '^[[:alnum:]]' $NODES`; do
+       echo; echo ">> NODE: $a <<"
        if [ -f "$SCRIPT" ]; then
            ssh -n $a at -f $SCRIPT now
        else