[SCM] CTDB repository - branch master updated - ctdb-1.12-75-g3b6ef34

Michael Adam obnox at samba.org
Tue Nov 29 05:45:20 MST 2011


The branch, master has been updated
       via  3b6ef3442f0b62d65ec0f9be67a2b1dbf7e4af67 (commit)
       via  5b527e6127a649fa80dcf9a7599b22bcb7cd3640 (commit)
       via  2d2ce07c51055d9400b22cd3c1fd682597cb921c (commit)
       via  0e26774f32d7ea0ce9d034c331730f5324f6b092 (commit)
       via  998b7f4450026051867525d91c6d8dcbd2326ab5 (commit)
       via  efc033c28ade97f9884794256d59a4553e052d5f (commit)
       via  7f46671fc912c969c5c87e50b77e2e3a7d6c8904 (commit)
       via  7e7d86ac9b05f8b67414200adc8ac87cfccf26cf (commit)
       via  326f88ef622620cb9e0569c4497bc0e86124beaa (commit)
       via  6f8e7480dadf15d1639355fdb61d5bef025a0325 (commit)
       via  9e8045a5b0d8bd9ab2e0343b329de9f45b883531 (commit)
       via  dd866116041e71cbf91e7fd91edcc9501634051d (commit)
       via  079f12dfc1edeac9748af15f652f2f1a6ed35548 (commit)
       via  7b4663dd2454b798841815044f898dead9b734e2 (commit)
       via  6ec68a2e667f66d2b194fe48cb75229a2777842e (commit)
       via  4ada4bfc4510886c5c7fcf49e09711b9d2dcb75d (commit)
       via  ddc5da3a0df7701934404192a0a0aa659a806acb (commit)
      from  ccd67cf7f26713e695000d89d9ce8cfa78bfe00f (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3b6ef3442f0b62d65ec0f9be67a2b1dbf7e4af67
Author: Michael Adam <obnox at samba.org>
Date:   Tue Nov 29 13:42:40 2011 +0100

    doc: commit generated ctdb.1 manpages after xml change

commit 5b527e6127a649fa80dcf9a7599b22bcb7cd3640
Author: Michael Adam <obnox at samba.org>
Date:   Tue Nov 29 13:41:16 2011 +0100

    doc: document the "--print-recordflags" parameter to "ctdb"

commit 2d2ce07c51055d9400b22cd3c1fd682597cb921c
Author: Michael Adam <obnox at samba.org>
Date:   Tue Nov 29 10:24:52 2011 +0100

    ctdb: add an option --print-recordflags to trigger printing record flags in catdb and dumpdbbackup
    
    This changes the default behaviour to not print record flags.

commit 0e26774f32d7ea0ce9d034c331730f5324f6b092
Author: Michael Adam <obnox at samba.org>
Date:   Tue Nov 29 13:39:37 2011 +0100

    doc: commit generated ctdb.1 manpages after xml change

commit 998b7f4450026051867525d91c6d8dcbd2326ab5
Author: Michael Adam <obnox at samba.org>
Date:   Tue Nov 29 13:39:08 2011 +0100

    doc: document the "--print-hash" parameter to "ctdb".

commit efc033c28ade97f9884794256d59a4553e052d5f
Author: Michael Adam <obnox at samba.org>
Date:   Tue Nov 29 00:56:23 2011 +0100

    ctdb: add an option --print-hash to enable printing of record hashes when dumping dbs

commit 7f46671fc912c969c5c87e50b77e2e3a7d6c8904
Author: Michael Adam <obnox at samba.org>
Date:   Tue Nov 29 13:37:29 2011 +0100

    doc: commit generated ctdb.1 manpages after xml change

commit 7e7d86ac9b05f8b67414200adc8ac87cfccf26cf
Author: Michael Adam <obnox at samba.org>
Date:   Tue Nov 29 13:36:38 2011 +0100

    doc: document the "--print-lmaster" parameter to "ctdb"

commit 326f88ef622620cb9e0569c4497bc0e86124beaa
Author: Michael Adam <obnox at samba.org>
Date:   Mon Nov 28 17:36:03 2011 +0100

    ctdb: add an option --print-lmaster to enable printing of lmaster in "ctdb catdb"

commit 6f8e7480dadf15d1639355fdb61d5bef025a0325
Author: Michael Adam <obnox at samba.org>
Date:   Tue Nov 29 13:35:02 2011 +0100

    doc: commit generated ctdb.1 manpages after xml change

commit 9e8045a5b0d8bd9ab2e0343b329de9f45b883531
Author: Michael Adam <obnox at samba.org>
Date:   Tue Nov 29 13:31:11 2011 +0100

    doc: document the "--print-datasize" parameter to "ctdb"

commit dd866116041e71cbf91e7fd91edcc9501634051d
Author: Michael Adam <obnox at samba.org>
Date:   Mon Nov 28 17:19:03 2011 +0100

    ctdb: add an option --print-datasize to only print datasize instead of dumping data in db dumps
    
    Used in catdb, cattdb and dumpdbbackup.

commit 079f12dfc1edeac9748af15f652f2f1a6ed35548
Author: Michael Adam <obnox at samba.org>
Date:   Tue Nov 29 13:32:25 2011 +0100

    doc: commit generated ctdb.1 manpages after xml change

commit 7b4663dd2454b798841815044f898dead9b734e2
Author: Michael Adam <obnox at samba.org>
Date:   Tue Nov 29 13:28:35 2011 +0100

    doc: document the --print-emptyrecords switch in the "ctdb" manpage.

commit 6ec68a2e667f66d2b194fe48cb75229a2777842e
Author: Michael Adam <obnox at samba.org>
Date:   Mon Nov 28 17:11:16 2011 +0100

    ctdb: add an option --print-emptyrecords to enable printing of empty records in dumping databases
    
    this option is used with the commands catdb, cattdb and dumpdbbackup.

commit 4ada4bfc4510886c5c7fcf49e09711b9d2dcb75d
Author: Michael Adam <obnox at samba.org>
Date:   Wed Dec 22 12:45:06 2010 +0100

    client: add version ctdb_traverse_ext() of ctdb_traverse() that can list empty records.

commit ddc5da3a0df7701934404192a0a0aa659a806acb
Author: Michael Adam <obnox at samba.org>
Date:   Sun Nov 27 23:16:33 2011 +0100

    traverse: add a flag to enable transferring empty records in cluster wide traverse
    
    This will be useful for also printing information about empty/deleted
    records in "ctdb catdb", e.g. for debugging vacuuming issues.

-----------------------------------------------------------------------

Summary of changes:
 client/ctdb_client.c    |   90 ++++++++++++++++++-------
 doc/ctdb.1              |   31 ++++++++-
 doc/ctdb.1.html         |  170 ++++++++++++++++++++++++++---------------------
 doc/ctdb.1.xml          |   53 +++++++++++++++
 include/ctdb_client.h   |   12 +++-
 include/ctdb_protocol.h |    1 +
 libctdb/ctdb.c          |    1 +
 server/ctdb_traverse.c  |   12 +++-
 tools/ctdb.c            |   55 ++++++++++++++-
 9 files changed, 315 insertions(+), 110 deletions(-)


Changeset truncated at 500 lines:

diff --git a/client/ctdb_client.c b/client/ctdb_client.c
index 1d63fa0..75ad0e1 100644
--- a/client/ctdb_client.c
+++ b/client/ctdb_client.c
@@ -2002,6 +2002,7 @@ struct traverse_state {
 	uint32_t count;
 	ctdb_traverse_func fn;
 	void *private_data;
+	bool listemptyrecords;
 };
 
 /*
@@ -2031,7 +2032,9 @@ static void traverse_handler(struct ctdb_context *ctdb, uint64_t srvid, TDB_DATA
 		return;
 	}
 
-	if (data.dsize == sizeof(struct ctdb_ltdb_header)) {
+	if (!state->listemptyrecords &&
+	    data.dsize == sizeof(struct ctdb_ltdb_header))
+	{
 		/* empty records are deleted records in ctdb */
 		return;
 	}
@@ -2043,12 +2046,17 @@ static void traverse_handler(struct ctdb_context *ctdb, uint64_t srvid, TDB_DATA
 	state->count++;
 }
 
-
-/*
-  start a cluster wide traverse, calling the supplied fn on each record
-  return the number of records traversed, or -1 on error
+/**
+ * start a cluster wide traverse, calling the supplied fn on each record
+ * return the number of records traversed, or -1 on error
+ *
+ * Extendet variant with a flag to signal whether empty records should
+ * be listed.
  */
-int ctdb_traverse(struct ctdb_db_context *ctdb_db, ctdb_traverse_func fn, void *private_data)
+static int ctdb_traverse_ext(struct ctdb_db_context *ctdb_db,
+			     ctdb_traverse_func fn,
+			     bool withemptyrecords,
+			     void *private_data)
 {
 	TDB_DATA data;
 	struct ctdb_traverse_start t;
@@ -2061,6 +2069,7 @@ int ctdb_traverse(struct ctdb_db_context *ctdb_db, ctdb_traverse_func fn, void *
 	state.count = 0;
 	state.private_data = private_data;
 	state.fn = fn;
+	state.listemptyrecords = withemptyrecords;
 
 	ret = ctdb_client_set_message_handler(ctdb_db->ctdb, srvid, traverse_handler, &state);
 	if (ret != 0) {
@@ -2071,6 +2080,7 @@ int ctdb_traverse(struct ctdb_db_context *ctdb_db, ctdb_traverse_func fn, void *
 	t.db_id = ctdb_db->db_id;
 	t.srvid = srvid;
 	t.reqid = 0;
+	t.withemptyrecords = withemptyrecords;
 
 	data.dptr = (uint8_t *)&t;
 	data.dsize = sizeof(t);
@@ -2096,6 +2106,18 @@ int ctdb_traverse(struct ctdb_db_context *ctdb_db, ctdb_traverse_func fn, void *
 	return state.count;
 }
 
+/**
+ * start a cluster wide traverse, calling the supplied fn on each record
+ * return the number of records traversed, or -1 on error
+ *
+ * Standard version which does not list the empty records:
+ * These are considered deleted.
+ */
+int ctdb_traverse(struct ctdb_db_context *ctdb_db, ctdb_traverse_func fn, void *private_data)
+{
+	return ctdb_traverse_ext(ctdb_db, fn, false, private_data);
+}
+
 #define ISASCII(x) (isprint(x) && !strchr("\"\\", (x)))
 /*
   called on each key during a catdb
@@ -2103,7 +2125,8 @@ int ctdb_traverse(struct ctdb_db_context *ctdb_db, ctdb_traverse_func fn, void *
 int ctdb_dumpdb_record(struct ctdb_context *ctdb, TDB_DATA key, TDB_DATA data, void *p)
 {
 	int i;
-	FILE *f = (FILE *)p;
+	struct ctdb_dump_db_context *c = (struct ctdb_dump_db_context *)p;
+	FILE *f = c->f;
 	struct ctdb_ltdb_header *h = (struct ctdb_ltdb_header *)data.dptr;
 
 	fprintf(f, "key(%u) = \"", (unsigned)key.dsize);
@@ -2118,25 +2141,40 @@ int ctdb_dumpdb_record(struct ctdb_context *ctdb, TDB_DATA key, TDB_DATA data, v
 
 	fprintf(f, "dmaster: %u\n", h->dmaster);
 	fprintf(f, "rsn: %llu\n", (unsigned long long)h->rsn);
-	fprintf(f, "flags: 0x%08x", h->flags);
-	if (h->flags & CTDB_REC_FLAG_MIGRATED_WITH_DATA) printf(" MIGRATED_WITH_DATA");
-	if (h->flags & CTDB_REC_FLAG_VACUUM_MIGRATED) printf(" VACUUM_MIGRATED");
-	if (h->flags & CTDB_REC_FLAG_AUTOMATIC) printf(" AUTOMATIC");
-	if (h->flags & CTDB_REC_RO_HAVE_DELEGATIONS) printf(" RO_HAVE_DELEGATIONS");
-	if (h->flags & CTDB_REC_RO_HAVE_READONLY) printf(" RO_HAVE_READONLY");
-	if (h->flags & CTDB_REC_RO_REVOKING_READONLY) printf(" RO_REVOKING_READONLY");
-	if (h->flags & CTDB_REC_RO_REVOKE_COMPLETE) printf(" RO_REVOKE_COMPLETE");
-	fprintf(f, "\n");
 
-	fprintf(f, "data(%u) = \"", (unsigned)(data.dsize - sizeof(*h)));
-	for (i=sizeof(*h);i<data.dsize;i++) {
-		if (ISASCII(data.dptr[i])) {
-			fprintf(f, "%c", data.dptr[i]);
-		} else {
-			fprintf(f, "\\%02X", data.dptr[i]);
+	if (c->printlmaster && ctdb->vnn_map != NULL) {
+		fprintf(f, "lmaster: %u\n", ctdb_lmaster(ctdb, &key));
+	}
+
+	if (c->printhash) {
+		fprintf(f, "hash: 0x%08x\n", ctdb_hash(&key));
+	}
+
+	if (c->printrecordflags) {
+		fprintf(f, "flags: 0x%08x", h->flags);
+		if (h->flags & CTDB_REC_FLAG_MIGRATED_WITH_DATA) printf(" MIGRATED_WITH_DATA");
+		if (h->flags & CTDB_REC_FLAG_VACUUM_MIGRATED) printf(" VACUUM_MIGRATED");
+		if (h->flags & CTDB_REC_FLAG_AUTOMATIC) printf(" AUTOMATIC");
+		if (h->flags & CTDB_REC_RO_HAVE_DELEGATIONS) printf(" RO_HAVE_DELEGATIONS");
+		if (h->flags & CTDB_REC_RO_HAVE_READONLY) printf(" RO_HAVE_READONLY");
+		if (h->flags & CTDB_REC_RO_REVOKING_READONLY) printf(" RO_REVOKING_READONLY");
+		if (h->flags & CTDB_REC_RO_REVOKE_COMPLETE) printf(" RO_REVOKE_COMPLETE");
+		fprintf(f, "\n");
+	}
+
+	if (c->printdatasize) {
+		fprintf(f, "data size: %u\n", (unsigned)data.dsize);
+	} else {
+		fprintf(f, "data(%u) = \"", (unsigned)(data.dsize - sizeof(*h)));
+		for (i=sizeof(*h);i<data.dsize;i++) {
+			if (ISASCII(data.dptr[i])) {
+				fprintf(f, "%c", data.dptr[i]);
+			} else {
+				fprintf(f, "\\%02X", data.dptr[i]);
+			}
 		}
+		fprintf(f, "\"\n");
 	}
-	fprintf(f, "\"\n");
 
 	fprintf(f, "\n");
 
@@ -2146,9 +2184,11 @@ int ctdb_dumpdb_record(struct ctdb_context *ctdb, TDB_DATA key, TDB_DATA data, v
 /*
   convenience function to list all keys to stdout
  */
-int ctdb_dump_db(struct ctdb_db_context *ctdb_db, FILE *f)
+int ctdb_dump_db(struct ctdb_db_context *ctdb_db,
+		 struct ctdb_dump_db_context *ctx)
 {
-	return ctdb_traverse(ctdb_db, ctdb_dumpdb_record, f);
+	return ctdb_traverse_ext(ctdb_db, ctdb_dumpdb_record,
+				 ctx->printemptyrecords, ctx);
 }
 
 /*
diff --git a/doc/ctdb.1 b/doc/ctdb.1
index b366102..4416f9f 100644
--- a/doc/ctdb.1
+++ b/doc/ctdb.1
@@ -2,12 +2,12 @@
 .\"     Title: ctdb
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\"      Date: 10/12/2011
+.\"      Date: 11/29/2011
 .\"    Manual: CTDB - clustered TDB database
 .\"    Source: ctdb
 .\"  Language: English
 .\"
-.TH "CTDB" "1" "10/12/2011" "ctdb" "CTDB \- clustered TDB database"
+.TH "CTDB" "1" "11/29/2011" "ctdb" "CTDB \- clustered TDB database"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -33,7 +33,7 @@ ctdb \- clustered tdb database management utility
 .HP \w'\fBctdb\ [\ OPTIONS\ ]\ COMMAND\ \&.\&.\&.\fR\ 'u
 \fBctdb [ OPTIONS ] COMMAND \&.\&.\&.\fR
 .HP \w'\fBctdb\fR\ 'u
-\fBctdb\fR [\-n\ <node>] [\-Y] [\-t\ <timeout>] [\-T\ <timelimit>] [\-?\ \-\-help] [\-\-usage] [\-d\ \-\-debug=<INTEGER>] [\-\-socket=<filename>]
+\fBctdb\fR [\-n\ <node>] [\-Y] [\-t\ <timeout>] [\-T\ <timelimit>] [\-?\ \-\-help] [\-\-usage] [\-d\ \-\-debug=<INTEGER>] [\-\-socket=<filename>] [\-\-print\-emptyrecords] [\-\-print\-datasize] [\-\-print\-lmaster] [\-\-print\-hash] [\-\-print\-recordflags]
 .SH "DESCRIPTION"
 .PP
 ctdb is a utility to view and manage a ctdb cluster\&.
@@ -82,6 +82,31 @@ Specify the socketname to use when connecting to the local ctdb daemon\&. The de
 .sp
 You only need to specify this parameter if you run multiple ctdb daemons on the same physical host and thus can not use the default name for the domain socket\&.
 .RE
+.PP
+\-\-print\-emptyrecords
+.RS 4
+This enables printing of empty records when dumping databases with the catdb, cattbd and dumpdbbackup commands\&. Records with empty data segment are considered deleted by ctdb and cleaned by the vacuuming mechanism, so this switch can come in handy for debugging the vacuuming behaviour\&.
+.RE
+.PP
+\-\-print\-datasize
+.RS 4
+This lets database dumps (catdb, cattdb, dumpdbbackup) print the size of the record data instead of dumping the data contents\&.
+.RE
+.PP
+\-\-print\-lmaster
+.RS 4
+This lets catdb print the lmaster for each record\&.
+.RE
+.PP
+\-\-print\-hash
+.RS 4
+This lets database dumps (catdb, cattdb, dumpdbbackup) print the hash for each record\&.
+.RE
+.PP
+\-\-print\-recordflags
+.RS 4
+This lets catdb and dumpdbbackup print the record flags for each record\&. Note that cattdb always prints the flags\&.
+.RE
 .SH "ADMINISTRATIVE COMMANDS"
 .PP
 These are commands used to monitor and administrate a CTDB cluster\&.
diff --git a/doc/ctdb.1.html b/doc/ctdb.1.html
index bdbdfc2..b161265 100644
--- a/doc/ctdb.1.html
+++ b/doc/ctdb.1.html
@@ -1,6 +1,6 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ctdb</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="ctdb"><a name="ctdb.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ctdb — clustered tdb database management utility</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ctdb [ OPTIONS ] COMMAND ...</code> </p></div><div class="cmdsynopsis"><p><code class="command">ctdb</code>  [-n <node>] [-Y] [-t <timeout>] [-T <timelimit>] [-? --help] [--usage] [-d --debug=<INTEGER>] [--socket=<filename>]</p></div></div><div class="refsect1" title="DESCRIPTION"><a name="id548384"></a><h2>DESCRIPTION</h2><p>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ctdb</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="ctdb"><a name="ctdb.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ctdb — clustered tdb database management utility</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ctdb [ OPTIONS ] COMMAND ...</code> </p></div><div class="cmdsynopsis"><p><code class="command">ctdb</code>  [-n <node>] [-Y] [-t <timeout>] [-T <timelimit>] [-? --help] [--usage] [-d --debug=<INTEGER>] [--socket=<filename>] [--print-emptyrecords] [--print-datasize] [--print-lmaster] [--print-hash] [--print-recordflags]</p></div></div><div class="refsect1" title="DESCRIPTION"><a name="id438922"></a
 ><h2>DESCRIPTION</h2><p>
       ctdb is a utility to view and manage a ctdb cluster.
-    </p></div><div class="refsect1" title="OPTIONS"><a name="id548394"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-n <pnn></span></dt><dd><p>
+    </p></div><div class="refsect1" title="OPTIONS"><a name="id438931"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-n <pnn></span></dt><dd><p>
             This specifies the physical node number on which to execute the 
 	    command. Default is to run the command on the daemon running on 
 	    the local host.
@@ -28,13 +28,31 @@
             You only need to specify this parameter if you run multiple ctdb 
             daemons on the same physical host and thus can not use the default
             name for the domain socket.
-          </p></dd></dl></div></div><div class="refsect1" title="Administrative Commands"><a name="id548518"></a><h2>Administrative Commands</h2><p>
+          </p></dd><dt><span class="term">--print-emptyrecords</span></dt><dd><p>
+            This enables printing of empty records when dumping databases
+            with the catdb, cattbd and dumpdbbackup commands. Records with
+            empty data segment are considered deleted by ctdb and cleaned
+            by the vacuuming mechanism, so this switch can come in handy for
+            debugging the vacuuming behaviour.
+          </p></dd><dt><span class="term">--print-datasize</span></dt><dd><p>
+            This lets database dumps (catdb, cattdb, dumpdbbackup) print the
+            size of the record data instead of dumping the data contents.
+          </p></dd><dt><span class="term">--print-lmaster</span></dt><dd><p>
+            This lets catdb print the lmaster for each record.
+          </p></dd><dt><span class="term">--print-hash</span></dt><dd><p>
+            This lets database dumps (catdb, cattdb, dumpdbbackup) print the
+            hash for each record.
+          </p></dd><dt><span class="term">--print-recordflags</span></dt><dd><p>
+            This lets catdb and dumpdbbackup print the
+            record flags for each record. Note that cattdb always
+            prints the flags.
+          </p></dd></dl></div></div><div class="refsect1" title="Administrative Commands"><a name="id439123"></a><h2>Administrative Commands</h2><p>
       These are commands used to monitor and administrate a CTDB cluster.
-    </p><div class="refsect2" title="pnn"><a name="id548526"></a><h3>pnn</h3><p>
+    </p><div class="refsect2" title="pnn"><a name="id439130"></a><h3>pnn</h3><p>
         This command displays the pnn of the current node.
-      </p></div><div class="refsect2" title="status"><a name="id548535"></a><h3>status</h3><p>
+      </p></div><div class="refsect2" title="status"><a name="id439139"></a><h3>status</h3><p>
         This command shows the current status of the ctdb node.
-      </p><div class="refsect3" title="node status"><a name="id548543"></a><h4>node status</h4><p>
+      </p><div class="refsect3" title="node status"><a name="id439147"></a><h4>node status</h4><p>
           Node status reflects the current status of the node. There are five possible states:
         </p><p>
           OK - This node is fully functional.
@@ -57,7 +75,7 @@
 	in a cluster like a node that is ok. Some interfaces to serve
 	public ip addresses are down, but at least one interface is up.
 	See also "ctdb ifaces".
-        </p></div><div class="refsect3" title="generation"><a name="id548592"></a><h4>generation</h4><p>
+        </p></div><div class="refsect3" title="generation"><a name="id439196"></a><h4>generation</h4><p>
           The generation id is a number that indicates the current generation 
           of a cluster instance. Each time a cluster goes through a 
           reconfiguration or a recovery its generation id will be changed.
@@ -78,10 +96,10 @@
 	  All nodes start with generation "INVALID" and are not assigned a real
 	  generation id until they have successfully been merged with a cluster
 	  through a recovery.
-        </p></div><div class="refsect3" title="VNNMAP"><a name="id548617"></a><h4>VNNMAP</h4><p>
+        </p></div><div class="refsect3" title="VNNMAP"><a name="id439222"></a><h4>VNNMAP</h4><p>
           The list of Virtual Node Numbers. This is a list of all nodes that actively participates in the cluster and that share the workload of hosting the Clustered TDB database records.
           Only nodes that are participating in the vnnmap can become lmaster or dmaster for a database record.
-        </p></div><div class="refsect3" title="Recovery mode"><a name="id548629"></a><h4>Recovery mode</h4><p>
+        </p></div><div class="refsect3" title="Recovery mode"><a name="id439233"></a><h4>Recovery mode</h4><p>
           This is the current recovery mode of the cluster. There are two possible modes:
         </p><p>
           NORMAL - The cluster is fully operational.
@@ -101,7 +119,7 @@
 	have been recovered, the node mode will change into NORMAL mode
 	and the databases will be "thawed", allowing samba to access the
 	databases again.
-	</p></div><div class="refsect3" title="Recovery master"><a name="id548660"></a><h4>Recovery master</h4><p>
+	</p></div><div class="refsect3" title="Recovery master"><a name="id439265"></a><h4>Recovery master</h4><p>
           This is the cluster node that is currently designated as the recovery master. This node is responsible of monitoring the consistency of the cluster and to perform the actual recovery process when reqired.
         </p><p>
 	Only one node at a time can be the designated recovery master. Which
@@ -123,9 +141,9 @@ hash:2 lmaster:2
 hash:3 lmaster:3
 Recovery mode:NORMAL (0)
 Recovery master:0
-      </pre></div><div class="refsect2" title="recmaster"><a name="id548692"></a><h3>recmaster</h3><p>
+      </pre></div><div class="refsect2" title="recmaster"><a name="id439297"></a><h3>recmaster</h3><p>
         This command shows the pnn of the node which is currently the recmaster.
-      </p></div><div class="refsect2" title="uptime"><a name="id548702"></a><h3>uptime</h3><p>
+      </p></div><div class="refsect2" title="uptime"><a name="id439306"></a><h3>uptime</h3><p>
         This command shows the uptime for the ctdb daemon. When the last recovery or ip-failover completed and how long it took. If the "duration" is shown as a negative number, this indicates that there is a recovery/failover in progress and it started that many seconds ago.
       </p><p>
 	Example: ctdb uptime
@@ -134,7 +152,7 @@ Current time of node          :                Thu Oct 29 10:38:54 2009
 Ctdbd start time              : (000 16:54:28) Wed Oct 28 17:44:26 2009
 Time of last recovery/failover: (000 16:53:31) Wed Oct 28 17:45:23 2009
 Duration of last recovery/failover: 2.248552 seconds
-      </pre></div><div class="refsect2" title="listnodes"><a name="id548728"></a><h3>listnodes</h3><p>
+      </pre></div><div class="refsect2" title="listnodes"><a name="id439333"></a><h3>listnodes</h3><p>
         This command shows lists the ip addresses of all the nodes in the cluster.
       </p><p>
 	Example: ctdb listnodes
@@ -143,7 +161,7 @@ Duration of last recovery/failover: 2.248552 seconds
 10.0.0.72
 10.0.0.73
 10.0.0.74
-      </pre></div><div class="refsect2" title="ping"><a name="id548751"></a><h3>ping</h3><p>
+      </pre></div><div class="refsect2" title="ping"><a name="id395997"></a><h3>ping</h3><p>
         This command will "ping" all CTDB daemons in the cluster to verify that they are processing commands correctly.
       </p><p>
 	Example: ctdb ping
@@ -154,7 +172,7 @@ response from 0 time=0.000054 sec  (3 clients)
 response from 1 time=0.000144 sec  (2 clients)
 response from 2 time=0.000105 sec  (2 clients)
 response from 3 time=0.000114 sec  (2 clients)
-      </pre></div><div class="refsect2" title="ifaces"><a name="id548775"></a><h3>ifaces</h3><p>
+      </pre></div><div class="refsect2" title="ifaces"><a name="id396021"></a><h3>ifaces</h3><p>
 	This command will display the list of network interfaces, which could
 	host public addresses, along with their status.
       </p><p>
@@ -177,13 +195,13 @@ name:eth2 link:up references:1
 :eth4:0:0
 :eth3:1:1
 :eth2:1:1
-      </pre></div><div class="refsect2" title="setifacelink <iface> <status>"><a name="id548812"></a><h3>setifacelink <iface> <status></h3><p>
+      </pre></div><div class="refsect2" title="setifacelink <iface> <status>"><a name="id396058"></a><h3>setifacelink <iface> <status></h3><p>
 	This command will set the status of a network interface.
 	The status needs to be "up" or "down". This is typically
 	used in the 10.interfaces script in the "monitor" event.
       </p><p>
 	Example: ctdb setifacelink eth0 up
-      </p></div><div class="refsect2" title="ip"><a name="id548826"></a><h3>ip</h3><p>
+      </p></div><div class="refsect2" title="ip"><a name="id396072"></a><h3>ip</h3><p>
         This command will display the list of public addresses that are provided by the cluster and which physical node is currently serving this ip. By default this command will ONLY show those public addresses that are known to the node itself. To see the full list of all public ips across the cluster you must use "ctdb ip -n all".
       </p><p>
 	Example: ctdb ip
@@ -213,7 +231,7 @@ Public IPs on node 0
 :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:
-      </pre></div><div class="refsect2" title="ipinfo <ip>"><a name="id505513"></a><h3>ipinfo <ip></h3><p>
+      </pre></div><div class="refsect2" title="ipinfo <ip>"><a name="id396122"></a><h3>ipinfo <ip></h3><p>
         This command will display details about the specified public addresses.
       </p><p>
 	Example: ctdb ipinfo 172.31.92.85
@@ -226,7 +244,7 @@ CurrentNode:0
 NumInterfaces:2
 Interface[1]: Name:eth4 Link:down References:0
 Interface[2]: Name:eth5 Link:up References:2 (active)
-      </pre></div><div class="refsect2" title="scriptstatus"><a name="id505536"></a><h3>scriptstatus</h3><p>
+      </pre></div><div class="refsect2" title="scriptstatus"><a name="id396145"></a><h3>scriptstatus</h3><p>
         This command displays which scripts where run in the previous monitoring cycle and the result of each script. If a script failed with an error, causing the node to become unhealthy, the output from that script is also shown.
       </p><p>
 	Example: ctdb scriptstatus
@@ -243,15 +261,15 @@ Interface[2]: Name:eth5 Link:up References:2 (active)
 41.httpd             Status:OK    Duration:0.039 Tue Mar 24 18:56:57 2009
 50.samba             Status:ERROR    Duration:0.082 Tue Mar 24 18:56:57 2009
    OUTPUT:ERROR: Samba tcp port 445 is not responding
-      </pre></div><div class="refsect2" title="disablescript <script>"><a name="id505566"></a><h3>disablescript <script></h3><p>
+      </pre></div><div class="refsect2" title="disablescript <script>"><a name="id396174"></a><h3>disablescript <script></h3><p>
 	This command is used to disable an eventscript.
       </p><p>
 	This will take effect the next time the eventscripts are being executed so it can take a short while until this is reflected in 'scriptstatus'.
-      </p></div><div class="refsect2" title="enablescript <script>"><a name="id505578"></a><h3>enablescript <script></h3><p>
+      </p></div><div class="refsect2" title="enablescript <script>"><a name="id396188"></a><h3>enablescript <script></h3><p>
 	This command is used to enable an eventscript.
       </p><p>
 	This will take effect the next time the eventscripts are being executed so it can take a short while until this is reflected in 'scriptstatus'.
-      </p></div><div class="refsect2" title="getvar <name>"><a name="id505592"></a><h3>getvar <name></h3><p>
+      </p></div><div class="refsect2" title="getvar <name>"><a name="id396202"></a><h3>getvar <name></h3><p>
         Get the runtime value of a tuneable variable.
       </p><p>
 	Example: ctdb getvar MaxRedirectCount
@@ -259,11 +277,11 @@ Interface[2]: Name:eth5 Link:up References:2 (active)
 	Example output:
       </p><pre class="screen">
 MaxRedirectCount    = 3
-      </pre></div><div class="refsect2" title="setvar <name> <value>"><a name="id505613"></a><h3>setvar <name> <value></h3><p>
+      </pre></div><div class="refsect2" title="setvar <name> <value>"><a name="id396223"></a><h3>setvar <name> <value></h3><p>
         Set the runtime value of a tuneable variable.
       </p><p>
 	Example: ctdb setvar MaxRedirectCount 5
-      </p></div><div class="refsect2" title="listvars"><a name="id505625"></a><h3>listvars</h3><p>
+      </p></div><div class="refsect2" title="listvars"><a name="id396235"></a><h3>listvars</h3><p>
         List all tuneable variables.
       </p><p>
 	Example: ctdb listvars
@@ -314,7 +332,7 @@ UseStatusEvents     = 0
 AllowUnhealthyDBRead = 0
 StatHistoryInterval = 1
 DeferredAttachTO    = 120
-      </pre></div><div class="refsect2" title="lvsmaster"><a name="id505656"></a><h3>lvsmaster</h3><p>
+      </pre></div><div class="refsect2" title="lvsmaster"><a name="id396266"></a><h3>lvsmaster</h3><p>
       This command shows which node is currently the LVSMASTER. The
       LVSMASTER is the node in the cluster which drives the LVS system and
       which receives all incoming traffic from clients.
@@ -325,7 +343,7 @@ DeferredAttachTO    = 120
       evenly onto the other nodes in the cluster. This is an alternative to using
       public ip addresses. See the manpage for ctdbd for more information
       about LVS.
-      </p></div><div class="refsect2" title="lvs"><a name="id505674"></a><h3>lvs</h3><p>
+      </p></div><div class="refsect2" title="lvs"><a name="id396284"></a><h3>lvs</h3><p>
       This command shows which nodes in the cluster are currently active in the
       LVS configuration. I.e. which nodes we are currently loadbalancing
       the single ip address across.
@@ -340,7 +358,7 @@ DeferredAttachTO    = 120
       </p><pre class="screen">
 2:10.0.0.13
 3:10.0.0.14
-      </pre></div><div class="refsect2" title="getcapabilities"><a name="id505700"></a><h3>getcapabilities</h3><p>
+      </pre></div><div class="refsect2" title="getcapabilities"><a name="id396310"></a><h3>getcapabilities</h3><p>
       This command shows the capabilities of the current node.
       Please see manpage for ctdbd for a full list of all capabilities and
       more detailed description.
@@ -359,7 +377,7 @@ DeferredAttachTO    = 120
 RECMASTER: YES
 LMASTER: YES
 LVS: NO
-      </pre></div><div class="refsect2" title="statistics"><a name="id505730"></a><h3>statistics</h3><p>
+      </pre></div><div class="refsect2" title="statistics"><a name="id396340"></a><h3>statistics</h3><p>
         Collect statistics from the CTDB daemon about how many calls it has served.
       </p><p>
 	Example: ctdb statistics
@@ -401,23 +419,23 @@ CTDB version 1
  max_hop_count                      0
  max_call_latency                   4.948321 sec
  max_lockwait_latency               0.000000 sec
-      </pre></div><div class="refsect2" title="statisticsreset"><a name="id505763"></a><h3>statisticsreset</h3><p>
+      </pre></div><div class="refsect2" title="statisticsreset"><a name="id396383"></a><h3>statisticsreset</h3><p>
         This command is used to clear all statistics counters in a node.
       </p><p>
 	Example: ctdb statisticsreset
-      </p></div><div class="refsect2" title="getreclock"><a name="id505775"></a><h3>getreclock</h3><p>
+      </p></div><div class="refsect2" title="getreclock"><a name="id396396"></a><h3>getreclock</h3><p>
 	This command is used to show the filename of the reclock file that is used.
       </p><p>
 	Example output:
       </p><pre class="screen">
 Reclock file:/gpfs/.ctdb/shared
-      </pre></div><div class="refsect2" title="setreclock [filename]"><a name="id505794"></a><h3>setreclock [filename]</h3><p>
+      </pre></div><div class="refsect2" title="setreclock [filename]"><a name="id396414"></a><h3>setreclock [filename]</h3><p>
 	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".
       </p><p>
 	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.
       </p><p>
 	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.
-      </p></div><div class="refsect2" title="getdebug"><a name="id505817"></a><h3>getdebug</h3><p>
+      </p></div><div class="refsect2" title="getdebug"><a name="id396435"></a><h3>getdebug</h3><p>
         Get the current debug level for the node. the debug level controls what information is written to the log file.
       </p><p>
 	The debug levels are mapped to the corresponding syslog levels.
@@ -427,42 +445,42 @@ Reclock file:/gpfs/.ctdb/shared
 	The list of debug levels from highest to lowest are :
       </p><p>
 	EMERG ALERT CRIT ERR WARNING NOTICE INFO DEBUG
-      </p></div><div class="refsect2" title="setdebug <debuglevel>"><a name="id505838"></a><h3>setdebug <debuglevel></h3><p>
+      </p></div><div class="refsect2" title="setdebug <debuglevel>"><a name="id396456"></a><h3>setdebug <debuglevel></h3><p>
         Set the debug level of a node. This controls what information will be logged.
       </p><p>
 	The debuglevel is one of EMERG ALERT CRIT ERR WARNING NOTICE INFO DEBUG
-      </p></div><div class="refsect2" title="getpid"><a name="id505851"></a><h3>getpid</h3><p>
+      </p></div><div class="refsect2" title="getpid"><a name="id396469"></a><h3>getpid</h3><p>
         This command will return the process id of the ctdb daemon.
-      </p></div><div class="refsect2" title="disable"><a name="id505860"></a><h3>disable</h3><p>
+      </p></div><div class="refsect2" title="disable"><a name="id396478"></a><h3>disable</h3><p>
         This command is used to administratively disable a node in the cluster.
         A disabled node will still participate in the cluster and host
         clustered TDB records but its public ip address has been taken over by
         a different node and it no longer hosts any services.
-      </p></div><div class="refsect2" title="enable"><a name="id505871"></a><h3>enable</h3><p>
+      </p></div><div class="refsect2" title="enable"><a name="id396489"></a><h3>enable</h3><p>
         Re-enable a node that has been administratively disabled.
-      </p></div><div class="refsect2" title="stop"><a name="id505880"></a><h3>stop</h3><p>
+      </p></div><div class="refsect2" title="stop"><a name="id396498"></a><h3>stop</h3><p>
         This command is used to administratively STOP a node in the cluster.
         A STOPPED node is connected to the cluster but will not host any
 	public ip addresse, nor does it participate in the VNNMAP.
 	The difference between a DISABLED node and a STOPPED node is that
 	a STOPPED node does not host any parts of the database which means


-- 
CTDB repository


More information about the samba-cvs mailing list