From 4b7914384e2613e5ec7c618071cb89187ed6f870 Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Wed, 22 Apr 2015 20:07:11 +0530 Subject: cli/tiering: volume info should display details about tier >> gluster volume info patchy Volume Name: patchy Type: Tier Volume ID: 8bf1a1ca-6417-484f-821f-18973a7502a8 Status: Created Number of Bricks: 8 Transport-type: tcp Hot Tier : Hot Tier Type : Replicate Number of Bricks: 1 x 2 = 2 Brick1: hostname:/home/brick30 Brick2: hostname:/home/brick31 Cold Bricks: Cold Tier Type : Disperse Number of Bricks: 1 x (4 + 2) = 6 Brick3: hostname:/home/brick20 Brick4: hostname:/home/brick21 Brick5: hostname:/home/brick23 Brick6: hostname:/home/brick24 Brick7: hostname:/home/brick25 Brick8: hostname:/home/brick26 Change-Id: I7b9025af81263ebecd641b4b6897b20db8b67195 BUG: 1212400 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/10339 Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi Tested-by: Gluster Build System --- xlators/mgmt/glusterd/src/glusterd-store.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (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 f6e31b24943..c3cb4e490d9 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -843,6 +843,13 @@ glusterd_volume_write_tier_details (int fd, glusterd_volinfo_t *volinfo) if (ret) goto out; + snprintf (buf, sizeof (buf), "%d", + volinfo->tier_info.cold_redundancy_count); + ret = gf_store_save_value (fd, GLUSTERD_STORE_KEY_COLD_REDUNDANCY_COUNT, + buf); + if (ret) + goto out; + snprintf (buf, sizeof (buf), "%d", volinfo->tier_info.hot_brick_count); ret = gf_store_save_value (fd, GLUSTERD_STORE_KEY_HOT_COUNT, buf); @@ -2567,6 +2574,10 @@ glusterd_store_update_volinfo (glusterd_volinfo_t *volinfo) } else if (!strncmp (key, GLUSTERD_STORE_KEY_COLD_DISPERSE_COUNT, strlen (key))) { volinfo->tier_info.cold_disperse_count = atoi (value); + } else if (!strncmp (key, + GLUSTERD_STORE_KEY_COLD_REDUNDANCY_COUNT, + strlen (key))) { + volinfo->tier_info.cold_redundancy_count = atoi (value); } else if (!strncmp (key, GLUSTERD_STORE_KEY_HOT_COUNT, strlen (key))) { volinfo->tier_info.hot_brick_count = atoi (value); -- cgit