From 99b778cbe179104af602b6eedebd31695bec16ae Mon Sep 17 00:00:00 2001 From: Dan Lambright Date: Mon, 13 Apr 2015 02:42:12 +0100 Subject: glusterd: support for tier volumes 'detach start' and 'detach commit' Back port of http://review.gluster.org/10108 These commands work in a manner analagous to rebalancing when removing a brick. The existing migration daemon detects "detach start" and switches to moving data off the hot tier. While in this state all lookups are directed to the cold tier. gluster v detach-tier start gluster v detach-tier commit The status and stop cli commands shall be submitted separately. >Change-Id: I24fda5cc3ba74f5fb8aa9a3234ad51f18b80a8a0 >BUG: 1205540 >Signed-off-by: Dan Lambright >Signed-off-by: root >Signed-off-by: Dan Lambright >Reviewed-on: http://review.gluster.org/10108 >Reviewed-by: Kaleb KEITHLEY Change-Id: I212d748d077fb5870ee84b316c653acbafbea3f7 BUG: 1220047 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/10708 Reviewed-by: Dan Lambright Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-store.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 4c28dd8b8ea..f6e31b24943 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -2569,10 +2569,10 @@ glusterd_store_update_volinfo (glusterd_volinfo_t *volinfo) volinfo->tier_info.cold_disperse_count = atoi (value); } else if (!strncmp (key, GLUSTERD_STORE_KEY_HOT_COUNT, strlen (key))) { - volinfo->tier_info.cold_brick_count = atoi (value); + volinfo->tier_info.hot_brick_count = atoi (value); } else if (!strncmp (key, GLUSTERD_STORE_KEY_HOT_REPLICA_COUNT, strlen (key))) { - volinfo->tier_info.cold_replica_count = atoi (value); + volinfo->tier_info.hot_replica_count = atoi (value); } else if (!strncmp (key, GLUSTERD_STORE_KEY_HOT_TYPE, strlen (key))) { volinfo->tier_info.hot_type = atoi (value); @@ -2664,7 +2664,10 @@ glusterd_store_update_volinfo (glusterd_volinfo_t *volinfo) break; case GF_CLUSTER_TYPE_TIER: - break; + volinfo->tier_info.cold_dist_leaf_count = + glusterd_calc_dist_leaf_count ( + volinfo->tier_info.cold_replica_count, 1); + break; default: GF_ASSERT (0); -- cgit