summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-store.c
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2015-04-22 20:07:11 +0530
committerVijay Bellur <vbellur@redhat.com>2015-05-10 03:38:39 -0700
commit4b7914384e2613e5ec7c618071cb89187ed6f870 (patch)
tree6d89a1e3f8a788b484dbcf36d37613f52d5f72c1 /xlators/mgmt/glusterd/src/glusterd-store.c
parent7c1415fa591172765ab1e7dc1b049bf162d53788 (diff)
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 <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/10339 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c11
1 files changed, 11 insertions, 0 deletions
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);