summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2016-04-18 14:44:18 +0530
committerRajesh Joseph <rjoseph@redhat.com>2016-04-25 01:42:46 -0700
commitfe6c4efcc66bca84aaceb352de38f0b58b70b780 (patch)
tree4a1acee64273c51a14c008fc6fc443a1c1b6f93a /xlators/mgmt
parent30b66ef3750ece0fb56e673afaca7948d53511e1 (diff)
clone/snapshot: Save restored_from_snap for clones
Bricks of cloned volumes are lvm bricks mounted in /run/gluster, which on reboot of the node gets cleared. Hence, these brick paths need to be recreated on glusterd restart and the appropriate lvms are mounted. Change-Id: I6da086288c0dbdcedf3a20fd53f25e3728bea473 BUG: 1328010 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/14021 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index e97c62ff355..7848a26babb 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -5228,6 +5228,9 @@ glusterd_do_snap_vol (glusterd_volinfo_t *origin_vol, glusterd_snap_t *snap,
}
cds_list_add_tail (&snap_vol->vol_list, &snap->volumes);
strcpy(snap_vol->volname, clonename);
+ gf_uuid_copy (snap_vol->restored_from_snap,
+ origin_vol->snapshot->snap_id);
+
} else {
GLUSTERD_GET_UUID_NOHYPHEN (snap_vol->volname, *snap_volid);
strcpy (snap_vol->parent_volname, origin_vol->volname);