diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-rebalance.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-rebalance.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c index c4674f56c33..501cf375b4b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c +++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c @@ -735,11 +735,19 @@ glusterd_op_stage_rebalance (dict_t *dict, char **op_errstr) goto out; } } - if ((strstr(cmd_str, "detach-tier") != NULL) && - (volinfo->rebal.op != GD_OP_REMOVE_BRICK)) { - snprintf (msg, sizeof(msg), "Detach-tier not started."); - ret = -1; - goto out; + if (strstr(cmd_str, "detach-tier") != NULL) { + if (volinfo->type != GF_CLUSTER_TYPE_TIER) { + snprintf (msg, sizeof(msg), "volume %s is not " + "a tier volume.", volinfo->volname); + ret = -1; + goto out; + } + if (volinfo->rebal.op != GD_OP_REMOVE_BRICK) { + snprintf (msg, sizeof(msg), "Detach-tier" + "not started"); + ret = -1; + goto out; + } } break; |