diff options
author | Rajesh Joseph <rjoseph@redhat.com> | 2013-10-30 10:50:45 +0530 |
---|---|---|
committer | shishir gowda <sgowda@redhat.com> | 2013-11-15 14:45:13 +0530 |
commit | 944e5529078cff3fd0ecbc30f037eddcc9bb63ae (patch) | |
tree | da5d6c2037fe555a25246b384cdc693589058381 /xlators/mgmt/glusterd/src/glusterd-handler.c | |
parent | e9b9b38caabe778fad4b6f2fd9ba9d8cc100c7df (diff) |
snapshot: Snapshot restore
GL-31: Ability to restore snapshot
Implemented snapshot restore for thin logical volume. As of now snapshot
restore for CG is not tested. Testing for snapshot restore of a volume
is done by changing the snapshot create process to create a thick snapshot.
This is done because --merge option to restore thin volume is not working in
the latest kernel.
Change-Id: Ia3ded7e6c4da5957a74e269a25ba3200e6fb2d8b
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handler.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index ef8a79293..259b82a81 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -363,6 +363,21 @@ glusterd_add_volume_detail_to_dict (glusterd_volinfo_t *volinfo, if (ret) goto out; + /* As of now, the snap volumes are also displayed as part of + volume info command. So this change is to display whether + the volume is original volume or the snap_volume. If + displaying of snap volumes in volume info o/p is not needed + this should be removed. + */ + snprintf (key, 256, "volume%d.snap_volume", count); + ret = dict_set_int32 (volumes, key, volinfo->is_snap_volume); + if (ret) { + gf_log (this->name, GF_LOG_WARNING, "failed to set whether " + "the volume is a snap volume or actual volume (%s)", + volinfo->volname); + goto out; + } + snprintf (key, 256, "volume%d.brick_count", count); ret = dict_set_int32 (volumes, key, volinfo->brick_count); if (ret) |