From a3fdb5637688bfed89be7489bacd66d7cefc2923 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Mon, 31 Mar 2014 15:45:23 +1100 Subject: ctdb-tools/ctdb: Add ctdb detach command to detach databases Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- ctdb/tools/ctdb.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'ctdb') diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 68d365bf789..ad85f084f29 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -5178,6 +5178,45 @@ static int control_attach(struct ctdb_context *ctdb, int argc, const char **argv return 0; } +/* + * detach from a database + */ +static int control_detach(struct ctdb_context *ctdb, int argc, + const char **argv) +{ + uint32_t db_id; + uint8_t flags; + int ret, i, status = 0; + + if (argc < 1) { + usage(); + } + + assert_single_node_only(); + + for (i=0; i] [recoverd]" }, { "clearlog", control_clearlog, true, false, "clear the log data from the in memory ringbuffer", "[recoverd]" }, { "attach", control_attach, true, false, "attach to a database", " [persistent]" }, + { "detach", control_detach, false, false, "detach from a database", " [ ...]" }, { "dumpmemory", control_dumpmemory, true, false, "dump memory map to stdout" }, { "rddumpmemory", control_rddumpmemory, true, false, "dump memory map from the recovery daemon to stdout" }, { "getpid", control_getpid, true, false, "get ctdbd process ID" }, -- cgit