summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-11-20 05:52:24 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-11-24 00:33:56 -0800
commitab5c5610bb37e5f4fbcc4722abf21de3dc2c9679 (patch)
treeeca1d70eb5f13729c49b51b30ea916da684478b9 /xlators/mgmt
parentcef1669d5fdf43e1df38189759345170b90a1455 (diff)
volgen: put back an amended form of check erased in 96f44835 ("do not error out if brick count is less than sub count...")
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2054 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2054
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c10
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) {