|
|
d1681e |
From 164e0384d6ae0ac9be713b4167d2b7151a027dc4 Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: Sunny Kumar <sunkumar@redhat.com>
|
|
|
d1681e |
Date: Tue, 28 Nov 2017 18:48:31 +0530
|
|
|
d1681e |
Subject: [PATCH 086/128] snapshot: lvm cleanup during snapshot remove
|
|
|
d1681e |
|
|
|
d1681e |
Problem : During snapshot remove lvm cleanup was skipped for deactivated
|
|
|
d1681e |
snapshots by assuming that its mount point is not present.
|
|
|
d1681e |
|
|
|
d1681e |
Fix : Do no skip lvm cleanup by checking active mount point.
|
|
|
d1681e |
|
|
|
d1681e |
Upstream Patch : https://review.gluster.org/18654
|
|
|
d1681e |
|
|
|
d1681e |
>BUG: 1509254
|
|
|
d1681e |
>Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
d1681e |
|
|
|
d1681e |
BUG: 1467903
|
|
|
d1681e |
Change-Id: I856d2d647c75db8b37b7f430277daef6eb7580a8
|
|
|
d1681e |
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
d1681e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/124534
|
|
|
d1681e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
d1681e |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
xlators/mgmt/glusterd/src/glusterd-snapshot.c | 20 +++++++++++++-------
|
|
|
d1681e |
1 file changed, 13 insertions(+), 7 deletions(-)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
|
|
|
d1681e |
index 275abe3..5bdf27f 100644
|
|
|
d1681e |
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
|
|
|
d1681e |
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
|
|
|
d1681e |
@@ -2984,13 +2984,19 @@ glusterd_lvm_snapshot_remove (dict_t *rsp_dict, glusterd_volinfo_t *snap_vol)
|
|
|
d1681e |
continue;
|
|
|
d1681e |
}
|
|
|
d1681e |
|
|
|
d1681e |
- ret = sys_lstat (brick_mount_path, &stbuf);
|
|
|
d1681e |
- if (ret) {
|
|
|
d1681e |
- gf_msg_debug (this->name, 0,
|
|
|
d1681e |
- "Brick %s:%s already deleted.",
|
|
|
d1681e |
- brickinfo->hostname, brickinfo->path);
|
|
|
d1681e |
- ret = 0;
|
|
|
d1681e |
- continue;
|
|
|
d1681e |
+ /* As deactivated snapshot have no active mount point we
|
|
|
d1681e |
+ * check only for activated snapshot.
|
|
|
d1681e |
+ */
|
|
|
d1681e |
+ if (snap_vol->status == GLUSTERD_STATUS_STARTED) {
|
|
|
d1681e |
+ ret = sys_lstat (brick_mount_path, &stbuf);
|
|
|
d1681e |
+ if (ret) {
|
|
|
d1681e |
+ gf_msg_debug (this->name, 0,
|
|
|
d1681e |
+ "Brick %s:%s already deleted.",
|
|
|
d1681e |
+ brickinfo->hostname,
|
|
|
d1681e |
+ brickinfo->path);
|
|
|
d1681e |
+ ret = 0;
|
|
|
d1681e |
+ continue;
|
|
|
d1681e |
+ }
|
|
|
d1681e |
}
|
|
|
d1681e |
|
|
|
d1681e |
if (brickinfo->snap_status == -1) {
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|