ctdb-doc: Update out-of-date documentation for CTDB socket options
[obnox/samba/samba-obnox.git] / ctdb / doc / ctdb.1.xml
index 7e12c7a06e2eb08cc73a74456890bf51dec790bc..d5bcbbfde11aca59ad89af57de21f7bf15d4a135 100644 (file)
       <listitem>
        <para>
          Produce output in machine readable form for easier parsing
-         by scripts. Not all commands support this option.
+         by scripts. This uses a field delimiter of ':'.  Not all
+         commands support this option.
+       </para>
+      </listitem>
+      </varlistentry>
+
+      <varlistentry><term>-x <parameter>SEPARATOR</parameter></term>
+      <listitem>
+       <para>
+         Use SEPARATOR to delimit fields in machine readable output.
+         This implies -Y.
+       </para>
+      </listitem>
+      </varlistentry>
+
+      <varlistentry><term>-X</term>
+      <listitem>
+       <para>
+         Produce output in machine readable form for easier parsing
+         by scripts. This uses a field delimiter of '|'.  Not all
+         commands support this option.
+       </para>
+       <para>
+         This is equivalent to "-x|" and avoids some shell quoting
+         issues.
        </para>
       </listitem>
       </varlistentry>
       <varlistentry><term>-d --debug=<parameter>DEBUGLEVEL</parameter></term>
       <listitem>
        <para>
-         Change the debug level for the command. Default is ERR (0).
+         Change the debug level for the command. Default is NOTICE (2).
        </para>
       </listitem>
       </varlistentry>
          Specify that FILENAME is the name of the Unix domain
          socket to use when connecting to the local CTDB
          daemon. The default is
-         <filename>/tmp/ctdb.socket</filename>.
+         <filename>/usr/local/var/run/ctdb/ctdbd.socket</filename>.
        </para>
       </listitem>
       </varlistentry>
@@ -511,12 +535,12 @@ name:eth4 link:down references:0
 name:eth3 link:up references:1
 name:eth2 link:up references:1
 
-# ctdb ifaces -Y
-:Name:LinkStatus:References:
-:eth5:1:2
-:eth4:0:0
-:eth3:1:1
-:eth2:1:1
+# ctdb -X ifaces
+|Name|LinkStatus|References|
+|eth5|1|2|
+|eth4|0|0|
+|eth3|1|1|
+|eth2|1|1|
        </screen>
       </refsect3>
     </refsect2>
@@ -529,7 +553,7 @@ name:eth2 link:up references:1
       <refsect3>
        <title>Example</title>
        <screen>
-# ctdb ip
+# ctdb ip -v
 Public IPs on node 0
 172.31.91.82 node[1] active[] available[eth2,eth3] configured[eth2,eth3]
 172.31.91.83 node[0] active[eth3] available[eth2,eth3] configured[eth2,eth3]
@@ -540,16 +564,16 @@ Public IPs on node 0
 172.31.92.84 node[1] active[] available[eth5] configured[eth4,eth5]
 172.31.92.85 node[0] active[eth5] available[eth5] configured[eth4,eth5]
 
-# ctdb ip -Y
-:Public IP:Node:ActiveInterface:AvailableInterfaces:ConfiguredInterfaces:
-:172.31.91.82:1::eth2,eth3:eth2,eth3:
-:172.31.91.83:0:eth3:eth2,eth3:eth2,eth3:
-:172.31.91.84:1::eth2,eth3:eth2,eth3:
-:172.31.91.85:0:eth2:eth2,eth3:eth2,eth3:
-:172.31.92.82:1::eth5:eth4,eth5:
-:172.31.92.83:0:eth5:eth5:eth4,eth5:
-:172.31.92.84:1::eth5:eth4,eth5:
-:172.31.92.85:0:eth5:eth5:eth4,eth5:
+# ctdb -X ip -v
+|Public IP|Node|ActiveInterface|AvailableInterfaces|ConfiguredInterfaces|
+|172.31.91.82|1||eth2,eth3|eth2,eth3|
+|172.31.91.83|0|eth3|eth2,eth3|eth2,eth3|
+|172.31.91.84|1||eth2,eth3|eth2,eth3|
+|172.31.91.85|0|eth2|eth2,eth3|eth2,eth3|
+|172.31.92.82|1||eth5|eth4,eth5|
+|172.31.92.83|0|eth5|eth5|eth4,eth5|
+|172.31.92.84|1||eth5|eth4,eth5|
+|172.31.92.85|0|eth5|eth5|eth4,eth5|
        </screen>
       </refsect3>
     </refsect2>
@@ -658,7 +682,6 @@ RecdFailCount           = 10
 LogLatencyMs            = 0
 RecLockLatencyMs        = 1000
 RecoveryDropAllIPs      = 120
-VerifyRecoveryLock      = 1
 VacuumInterval          = 10
 VacuumMaxRunTime        = 30
 RepackLimit             = 10000
@@ -859,30 +882,51 @@ DB Statistics: locking.tdb
     <refsect2>
       <title>getreclock</title>
       <para>
-       This command is used to show the filename of the reclock file that is used.
+       Show the name of the recovery lock file, if any.
       </para>
 
       <para>
        Example output:
       </para>
       <screen>
-       Reclock file:/gpfs/.ctdb/shared
+       Reclock file:/clusterfs/.ctdb/recovery.lock
       </screen>
 
     </refsect2>
 
     <refsect2>
-      <title>setreclock [filename]</title>
+      <title>
+       setreclock <optional><parameter>FILE</parameter></optional>
+      </title>
+
       <para>
-       This command is used to modify, or clear, the file that is used as the reclock file at runtime. When this command is used, the reclock file checks are disabled. To re-enable the checks the administrator needs to activate the "VerifyRecoveryLock" tunable using "ctdb setvar".
+       FILE specifies the name of the recovery lock file.  If the
+       recovery lock file is changed at run-time then this will cause
+       a recovery, which in turn causes the recovery lock to be
+       retaken.
       </para>
 
       <para>
-       If run with no parameter this will remove the reclock file completely. If run with a parameter the parameter specifies the new filename to use for the recovery lock.
+       If no FILE is specified then a recovery lock file will no
+       longer be used.
       </para>
 
       <para>
-       This command only affects the runtime settings of a ctdb node and will be lost when ctdb is restarted. For persistent changes to the reclock file setting you must edit /etc/sysconfig/ctdb.
+       This command only affects the run-time setting of a single
+       CTDB node.  This setting <emphasis>must</emphasis> be changed
+       on all nodes simultaneously by specifying <option>-n
+       all</option> (or similar).  For information about configuring
+       the recovery lock file please see the
+       <citetitle>CTDB_RECOVERY_LOCK</citetitle> entry in
+       <citerefentry><refentrytitle>ctdbd.conf</refentrytitle>
+       <manvolnum>5</manvolnum></citerefentry> and the
+       <citetitle>--reclock</citetitle> entry in
+       <citerefentry><refentrytitle>ctdbd</refentrytitle>
+       <manvolnum>1</manvolnum></citerefentry>.  For information
+       about the recovery lock please see the <citetitle>RECOVERY
+       LOCK</citetitle> section in
+       <citerefentry><refentrytitle>ctdb</refentrytitle>
+       <manvolnum>7</manvolnum></citerefentry>.
       </para>
     </refsect2>
 
@@ -902,7 +946,7 @@ DB Statistics: locking.tdb
        The list of debug levels from highest to lowest are :
       </para>
       <para>
-       ALERT CRIT ERR WARNING NOTICE INFO DEBUG
+       ERR WARNING NOTICE INFO DEBUG
       </para>
     </refsect2>
 
@@ -912,7 +956,7 @@ DB Statistics: locking.tdb
        Set the debug level of a node. This controls what information will be logged.
       </para>
       <para>
-       The debuglevel is one of ALERT CRIT ERR WARNING NOTICE INFO DEBUG
+       The debuglevel is one of ERR WARNING NOTICE INFO DEBUG
       </para>
     </refsect2>
 
@@ -1044,54 +1088,94 @@ DB Statistics: locking.tdb
     <refsect2>
       <title>reloadnodes</title>
       <para>
-       This command is used when adding new nodes, or removing existing nodes from an existing cluster.
-      </para>
-      <para>
-       Procedure to add a node:
-      </para>
-      <para>
-       1, To expand an existing cluster, first ensure with 'ctdb status' that
-       all nodes are up and running and that they are all healthy.
-       Do not try to expand a cluster unless it is completely healthy!
-      </para>
-      <para>
-       2, On all nodes, edit /etc/ctdb/nodes and add the new node as the last
-       entry to the file. The new node MUST be added to the end of this file!
-      </para>
-      <para>
-       3, Verify that all the nodes have identical /etc/ctdb/nodes files after you edited them and added the new node!
-      </para>
-      <para>
-       4, Run 'ctdb reloadnodes' to force all nodes to reload the nodesfile.
-      </para>
-      <para>
-       5, Use 'ctdb status' on all nodes and verify that they now show the additional node.
-      </para>
-      <para>
-       6, Install and configure the new node and bring it online.
-      </para>
-      <para>
-       Procedure to remove a node:
-      </para>
-      <para>
-       1, To remove a node from an existing cluster, first ensure with 'ctdb status' that
-       all nodes, except the node to be deleted, are up and running and that they are all healthy.
-       Do not try to remove a node from a cluster unless the cluster is completely healthy!
-      </para>
-      <para>
-       2, Shutdown and poweroff the node to be removed.
-      </para>
-      <para>
-       3, On all other nodes, edit the /etc/ctdb/nodes file and comment out the node to be removed. Do not delete the line for that node, just comment it out by adding a '#' at the beginning of the line.
-      </para>
-      <para>
-       4, Run 'ctdb reloadnodes' to force all nodes to reload the nodesfile.
+       This command is used when adding new nodes, or removing
+       existing nodes from an existing cluster.
       </para>
       <para>
-       5, Use 'ctdb status' on all nodes and verify that the deleted node no longer shows up in the list..
+       Procedure to add nodes:
       </para>
+      <orderedlist>
+       <listitem>
+         <para>
+            To expand an existing cluster, first ensure with
+            <command>ctdb status</command> that all nodes are up and
+            running and that they are all healthy.  Do not try to
+            expand a cluster unless it is completely healthy!
+         </para>
+       </listitem>
+       <listitem>
+         <para>
+           On all nodes, edit <filename>/usr/local/etc/ctdb/nodes</filename>
+           and <emphasis>add the new nodes at the end of this
+           file</emphasis>.
+         </para>
+       </listitem>
+       <listitem>
+         <para>
+           Verify that all the nodes have identical
+           <filename>/usr/local/etc/ctdb/nodes</filename> files after adding
+           the new nodes.
+         </para>
+       </listitem>
+       <listitem>
+         <para>
+           Run <command>ctdb reloadnodes</command> to force all nodes
+           to reload the nodes file.
+         </para>
+       </listitem>
+       <listitem>
+         <para>
+           Use <command>ctdb status</command> on all nodes and verify
+           that they now show the additional nodes.
+         </para>
+       </listitem>
+       <listitem>
+         <para>
+           Install and configure the new node and bring it online.
+         </para>
+       </listitem>
+      </orderedlist>
       <para>
+       Procedure to remove nodes:
       </para>
+      <orderedlist>
+       <listitem>
+         <para>
+           To remove nodes from an existing cluster, first ensure
+           with <command>ctdb status</command> that all nodes, except
+           the node to be deleted, are up and running and that they
+           are all healthy.  Do not try to remove nodes from a
+           cluster unless the cluster is completely healthy!
+         </para>
+       </listitem>
+       <listitem>
+         <para>
+           Shutdown and power off the node to be removed.
+         </para>
+       </listitem>
+       <listitem>
+         <para>
+           On all other nodes, edit the
+           <filename>/usr/local/etc/ctdb/nodes</filename> file and
+           <emphasis>comment out</emphasis> the nodes to be removed.
+           <emphasis>Do not delete the lines for the deleted
+           nodes</emphasis>, just comment them out by adding a '#' at
+           the beginning of the lines.
+         </para>
+       </listitem>
+       <listitem>
+         <para>
+           Run <command>ctdb reloadnodes</command> to force all nodes
+           to reload the nodes file.
+         </para>
+       </listitem>
+       <listitem>
+         <para>
+           Use <command>ctdb status</command> on all nodes and verify
+           that the deleted nodes are no longer listed.
+         </para>
+       </listitem>
+      </orderedlist>
 
     </refsect2>
 
@@ -1133,24 +1217,24 @@ DB Statistics: locking.tdb
        <screen>
 # ctdb getdbmap
 Number of databases:10
-dbid:0x435d3410 name:notify.tdb path:/var/ctdb/notify.tdb.0 
-dbid:0x42fe72c5 name:locking.tdb path:/var/ctdb/locking.tdb.0
-dbid:0x1421fb78 name:brlock.tdb path:/var/ctdb/brlock.tdb.0 
-dbid:0x17055d90 name:connections.tdb path:/var/ctdb/connections.tdb.0 
-dbid:0xc0bdde6a name:sessionid.tdb path:/var/ctdb/sessionid.tdb.0 
-dbid:0x122224da name:test.tdb path:/var/ctdb/test.tdb.0 
-dbid:0x2672a57f name:idmap2.tdb path:/var/ctdb/persistent/idmap2.tdb.0 PERSISTENT
-dbid:0xb775fff6 name:secrets.tdb path:/var/ctdb/persistent/secrets.tdb.0 PERSISTENT
-dbid:0xe98e08b6 name:group_mapping.tdb path:/var/ctdb/persistent/group_mapping.tdb.0 PERSISTENT
-dbid:0x7bbbd26c name:passdb.tdb path:/var/ctdb/persistent/passdb.tdb.0 PERSISTENT
+dbid:0x435d3410 name:notify.tdb path:/usr/local/var/lib/ctdb/notify.tdb.0
+dbid:0x42fe72c5 name:locking.tdb path:/usr/local/var/lib/ctdb/locking.tdb.0
+dbid:0x1421fb78 name:brlock.tdb path:/usr/local/var/lib/ctdb/brlock.tdb.0
+dbid:0x17055d90 name:connections.tdb path:/usr/local/var/lib/ctdb/connections.tdb.0
+dbid:0xc0bdde6a name:sessionid.tdb path:/usr/local/var/lib/ctdb/sessionid.tdb.0
+dbid:0x122224da name:test.tdb path:/usr/local/var/lib/ctdb/test.tdb.0
+dbid:0x2672a57f name:idmap2.tdb path:/usr/local/var/lib/ctdb/persistent/idmap2.tdb.0 PERSISTENT
+dbid:0xb775fff6 name:secrets.tdb path:/usr/local/var/lib/ctdb/persistent/secrets.tdb.0 PERSISTENT
+dbid:0xe98e08b6 name:group_mapping.tdb path:/usr/local/var/lib/ctdb/persistent/group_mapping.tdb.0 PERSISTENT
+dbid:0x7bbbd26c name:passdb.tdb path:/usr/local/var/lib/ctdb/persistent/passdb.tdb.0 PERSISTENT
 
 # ctdb getdbmap  # example for unhealthy database
 Number of databases:1
-dbid:0xb775fff6 name:secrets.tdb path:/var/ctdb/persistent/secrets.tdb.0 PERSISTENT UNHEALTHY
+dbid:0xb775fff6 name:secrets.tdb path:/usr/local/var/lib/ctdb/persistent/secrets.tdb.0 PERSISTENT UNHEALTHY
 
-# ctdb -Y getdbmap
-:ID:Name:Path:Persistent:Unhealthy:
-:0x7bbbd26c:passdb.tdb:/var/ctdb/persistent/passdb.tdb.0:1:0:
+# ctdb -X getdbmap
+|ID|Name|Path|Persistent|Unhealthy|
+|0x7bbbd26c|passdb.tdb|/usr/local/var/lib/ctdb/persistent/passdb.tdb.0|1|0|
        </screen>
       </refsect3>
     </refsect2>
@@ -1450,16 +1534,16 @@ RUNNING
 # ctdb getdbstatus test.tdb.0
 dbid: 0x122224da
 name: test.tdb
-path: /var/ctdb/test.tdb.0
+path: /usr/local/var/lib/ctdb/test.tdb.0
 PERSISTENT: no
 HEALTH: OK
 
 # ctdb getdbstatus registry.tdb  # with a corrupted TDB
 dbid: 0xf2a58948
 name: registry.tdb
-path: /var/ctdb/persistent/registry.tdb.0
+path: /usr/local/var/lib/ctdb/persistent/registry.tdb.0
 PERSISTENT: yes
-HEALTH: NO-HEALTHY-NODES - ERROR - Backup of corrupted TDB in '/var/ctdb/persistent/registry.tdb.0.corrupted.20091208091949.0Z'
+HEALTH: NO-HEALTHY-NODES - ERROR - Backup of corrupted TDB in '/usr/local/var/lib/ctdb/persistent/registry.tdb.0.corrupted.20091208091949.0Z'
        </screen>
       </refsect3>
     </refsect2>