From 17295c37f9ad12163f7c449dbe6f76aff90b493f Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Fri, 1 Oct 2010 13:04:57 +0000 Subject: rebalance: bring in two stages step 1: fix layout (quick pass, so the newly added brick can participate in distribute's entry creations) step 2: migrate data (do the actual rebalance) Its advised to run rebalance after add-brick, and let it complete at-least 'step 1', so things will be smooth with distribute. Signed-off-by: Amar Tumballi Signed-off-by: Vijay Bellur BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971 --- cli/src/cli3_1-cops.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'cli/src/cli3_1-cops.c') diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli3_1-cops.c index ecf454cbf..1538a4c67 100644 --- a/cli/src/cli3_1-cops.c +++ b/cli/src/cli3_1-cops.c @@ -681,15 +681,20 @@ gf_cli3_1_defrag_volume_cbk (struct rpc_req *req, struct iovec *iov, if (rsp.op_errno == 0) status = "not started"; if (rsp.op_errno == 1) - status = "in progress"; + status = "step 1: layout fix in progress"; if (rsp.op_errno == 2) - status = "stopped"; + status = "step 2: data migration in progress"; if (rsp.op_errno == 3) - status = "completed"; + status = "stopped"; if (rsp.op_errno == 4) + status = "completed"; + if (rsp.op_errno == 5) status = "failed"; - if (rsp.files) { + if (rsp.files && (rsp.op_errno == 1)) { + cli_out ("rebalance %s: fixed layout %"PRId64, + status, rsp.files); + } else if (rsp.files) { cli_out ("rebalance %s: rebalanced %"PRId64 " files of size %"PRId64" (total files" " scanned %"PRId64")", status, -- cgit