summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-10-01 13:04:57 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-01 22:38:54 -0700
commit17295c37f9ad12163f7c449dbe6f76aff90b493f (patch)
treeb0fef4609378baae8c4e4d814bab3fe4efd9331f /cli/src
parent4afbc4e1c44d5da4d4cd6141fb2b693e7baeabe4 (diff)
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 <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/cli3_1-cops.c13
1 files changed, 9 insertions, 4 deletions
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,