From 0f56f0ce2d2e18fbb2eedf14e93b5a592f0005c3 Mon Sep 17 00:00:00 2001 From: Joseph Fernandes Date: Mon, 14 Apr 2014 19:18:41 +0530 Subject: glusterd/snapshot: Activation and De-activation of snapshot Previously, snapshots by default were activated on creation and there was no option to activate or deactivate them on demand. This will allow the user to activate and deactivate on demand. The CLI goes as follows 1) Activate the snap using a command "gluster snapshot activate [force]" 2) Deactivate the snap using a command "gluster snapshot deactivate " Note: Even now the snapshot will be activated during creation. Change-Id: I0946d800780f26c63fa1fcaf29aabc900140448f BUG: 1061685 Signed-off-by: Joseph Fernandes Reviewed-on: http://review.gluster.org/7476 Tested-by: Gluster Build System Reviewed-by: Vijaikumar Mallikarjuna Reviewed-by: Vijay Bellur --- cli/src/cli-cmd-snapshot.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cli/src/cli-cmd-snapshot.c') diff --git a/cli/src/cli-cmd-snapshot.c b/cli/src/cli-cmd-snapshot.c index 941dcbdd2a3..45fa5673f7a 100644 --- a/cli/src/cli-cmd-snapshot.c +++ b/cli/src/cli-cmd-snapshot.c @@ -110,6 +110,14 @@ struct cli_cmd snapshot_cmds[] = { cli_cmd_snapshot_cbk, "Snapshot Delete." }, + {"snapshot activate [force]", + cli_cmd_snapshot_cbk, + "Activate snapshot volume." + }, + {"snapshot deactivate ", + cli_cmd_snapshot_cbk, + "Deactivate snapshot volume." + }, { NULL, NULL, NULL } }; -- cgit