diff options
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 110008eb072..ecd411127af 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -1109,6 +1109,16 @@ client_graph_builder (glusterfs_graph_t *graph, glusterd_volinfo_t *volinfo, return -1; } + if (volinfo->sub_count && volinfo->sub_count < volinfo->brick_count && + volinfo->brick_count % volinfo->sub_count != 0) { + gf_log ("", GF_LOG_ERROR, + "volume inconsistency: " + "total number of bricks (%d) is not divisible with ", + "number of bricks per cluster (%d) in a multi-cluster " + "setup", + volinfo->brick_count, volinfo->sub_count); + return -1; + } i = 0; list_for_each_entry (brick, &volinfo->bricks, brick_list) { |