diff options
author | Avra Sengupta <asengupt@redhat.com> | 2016-04-18 14:44:18 +0530 |
---|---|---|
committer | Rajesh Joseph <rjoseph@redhat.com> | 2016-04-26 09:00:34 -0700 |
commit | 82b69e2554c5293bc3b15e737e246c4c517b2421 (patch) | |
tree | cf9e0fc7eeab72ae4cc9f2c9cfbe49be3f8d79ff /xlators | |
parent | 3c5586b3e8772f0a9d25502c9b4474e987ecc656 (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.
Backport of:
> 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>
Change-Id: I02d10e6bca99f6d78b50cb91c677e33a8dcefa17
BUG: 1329989
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-on: http://review.gluster.org/14059
Reviewed-by: mohammed rafi kc <rkavunga@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapshot.c | 3 |
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 e5c5c4c0489..09410ac3fb3 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -5233,6 +5233,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); |