diff --git a/src/tm_mad/ceph/snap_create b/src/tm_mad/ceph/snap_create index 664c979810..d8cca4a229 100755 --- a/src/tm_mad/ceph/snap_create +++ b/src/tm_mad/ceph/snap_create @@ -1,7 +1,7 @@ #!/bin/bash # -------------------------------------------------------------------------- # -# Copyright 2002-2015, OpenNebula Project (OpenNebula.org), C12G Labs # +# Copyright 2002-2015, OpenNebula Project, OpenNebula Systems # # # # Licensed under the Apache License, Version 2.0 (the "License"); you may # # not use this file except in compliance with the License. You may obtain # @@ -69,7 +69,7 @@ else fi #------------------------------------------------------------------------------- -# Create snapshots (stored in the current volume) +# Create snapshots #------------------------------------------------------------------------------- if [ -n "$CEPH_USER" ]; then @@ -88,6 +88,8 @@ SNAP_CREATE_CMD=$(cat <&2 + exit 1 + fi + + $RBD snap create $RBD_DST@$SNAP_ID + $RBD snap protect $RBD_DST@$SNAP_ID +EOF +) + +ssh_exec_and_log "$SRC_HOST" "$SNAP_CREATE_CMD" \ + "Error creating snapshot $RBD_DST@$SNAP_ID" + +exit 0