|
|
12a457 |
From e30dce6335eae8eac87cbd5dbd97353bbdb5584c Mon Sep 17 00:00:00 2001
|
|
|
12a457 |
From: Avra Sengupta <asengupt@redhat.com>
|
|
|
12a457 |
Date: Mon, 18 Apr 2016 14:44:18 +0530
|
|
|
12a457 |
Subject: [PATCH 091/104] clone/snapshot: Save restored_from_snap for clones
|
|
|
12a457 |
|
|
|
12a457 |
Bricks of cloned volumes are lvm bricks mounted in
|
|
|
12a457 |
/run/gluster, which on reboot of the node gets
|
|
|
12a457 |
cleared. Hence, these brick paths need to be recreated
|
|
|
12a457 |
on glusterd restart and the appropriate lvms are
|
|
|
12a457 |
mounted.
|
|
|
12a457 |
|
|
|
12a457 |
Backport of (Upstream master):
|
|
|
12a457 |
> Change-Id: I6da086288c0dbdcedf3a20fd53f25e3728bea473
|
|
|
12a457 |
> BUG: 1328010
|
|
|
12a457 |
> Signed-off-by: Avra Sengupta <asengupt@redhat.com>
|
|
|
12a457 |
> Reviewed-on: http://review.gluster.org/14021
|
|
|
12a457 |
> Smoke: Gluster Build System <jenkins@build.gluster.com>
|
|
|
12a457 |
> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
|
|
|
12a457 |
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
|
|
|
12a457 |
> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
|
|
|
12a457 |
|
|
|
12a457 |
and (Upstream release-3.7)
|
|
|
12a457 |
|
|
|
12a457 |
> Change-Id: I02d10e6bca99f6d78b50cb91c677e33a8dcefa17
|
|
|
12a457 |
> BUG: 1329989
|
|
|
12a457 |
> Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
|
|
|
12a457 |
> Reviewed-on: http://review.gluster.org/14059
|
|
|
12a457 |
> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com>
|
|
|
12a457 |
> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
|
|
|
12a457 |
> Smoke: Gluster Build System <jenkins@build.gluster.com>
|
|
|
12a457 |
> Reviewed-by: Avra Sengupta <asengupt@redhat.com>
|
|
|
12a457 |
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
|
|
|
12a457 |
|
|
|
12a457 |
Change-Id: I74bc064c886963dbc20e5db94c83a1ce0715f832
|
|
|
12a457 |
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
|
|
|
12a457 |
BUG: 1327165
|
|
|
12a457 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/73089
|
|
|
12a457 |
Reviewed-by: Rafi Kavungal Chundattu Parambil <rkavunga@redhat.com>
|
|
|
12a457 |
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
|
|
|
12a457 |
---
|
|
|
12a457 |
xlators/mgmt/glusterd/src/glusterd-snapshot.c | 3 +++
|
|
|
12a457 |
1 files changed, 3 insertions(+), 0 deletions(-)
|
|
|
12a457 |
|
|
|
12a457 |
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
|
|
|
12a457 |
index 4912f56..da6c301 100644
|
|
|
12a457 |
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
|
|
|
12a457 |
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
|
|
|
12a457 |
@@ -5233,6 +5233,9 @@ glusterd_do_snap_vol (glusterd_volinfo_t *origin_vol, glusterd_snap_t *snap,
|
|
|
12a457 |
}
|
|
|
12a457 |
cds_list_add_tail (&snap_vol->vol_list, &snap->volumes);
|
|
|
12a457 |
strcpy(snap_vol->volname, clonename);
|
|
|
12a457 |
+ gf_uuid_copy (snap_vol->restored_from_snap,
|
|
|
12a457 |
+ origin_vol->snapshot->snap_id);
|
|
|
12a457 |
+
|
|
|
12a457 |
} else {
|
|
|
12a457 |
GLUSTERD_GET_UUID_NOHYPHEN (snap_vol->volname, *snap_volid);
|
|
|
12a457 |
strcpy (snap_vol->parent_volname, origin_vol->volname);
|
|
|
12a457 |
--
|
|
|
12a457 |
1.7.1
|
|
|
12a457 |
|