From 2b3b3edee2d849b4aee314048987dc995d9679a1 Mon Sep 17 00:00:00 2001 From: Sunny Kumar Date: Wed, 16 Aug 2017 14:04:45 +0530 Subject: snapshot: Issue with other processes accessing the mounted brick Added code for unmount of activated snapshot brick during snapshot deactivation process which make sense as mount point for deactivated bricks should not exist. Removed code for mounting newly created snapshot, as newly created snapshots should not mount until it is activated. Added code for mount point creation and snapshot mount during snapshot activation. Added validation during glusterd init for mounting only those snapshot whose status is either STARTED or RESTORED. During snapshot restore, mount point for stopped snap should exist as it is required to set extended attribute. During handshake, after getting updates from friend mount point for activated snapshot should exist and should not for deactivated snapshot. While getting snap status we should show relevent information for deactivated snapshots, after this pathch 'gluster snap status' command will show output like- Snap Name : snap1 Snap UUID : snap-uuid Brick Path : server1:/run/gluster/snaps/snap-vol-name/brick Volume Group : N/A (Deactivated Snapshot) Brick Running : No Brick PID : N/A Data Percentage : N/A LV Size : N/A Fixes: #276 Change-Id: I65783488e35fac43632615ce1b8ff7b8e84834dc BUG: 1482023 Signed-off-by: Sunny Kumar --- xlators/mgmt/glusterd/src/glusterd-snapshot-utils.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot-utils.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.h b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.h index b13493d2dff..d619f1d3106 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.h @@ -75,6 +75,9 @@ glusterd_mount_lvm_snapshot (glusterd_brickinfo_t *brickinfo, int32_t glusterd_umount (const char *path); +int32_t +glusterd_snap_unmount (xlator_t *this, glusterd_volinfo_t *volinfo); + int32_t glusterd_add_snapshots_to_export_dict (dict_t *peer_data); -- cgit