[pve-devel] [PATCH 03/21] sheepdog : add volume_snapshot

Alexandre Derumier aderumier at odiso.com
Thu Sep 6 10:27:53 CEST 2012


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/Storage/SheepdogPlugin.pm |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/PVE/Storage/SheepdogPlugin.pm b/PVE/Storage/SheepdogPlugin.pm
index af8934a..14d2f88 100644
--- a/PVE/Storage/SheepdogPlugin.pm
+++ b/PVE/Storage/SheepdogPlugin.pm
@@ -242,4 +242,15 @@ sub volume_resize {
     return undef;
 }
 
+sub volume_snapshot {
+    my ($class, $scfg, $storeid, $volname, $snap, $running) = @_;
+
+    return 1 if $running;
+
+    my $cmd = &$collie_cmd($scfg, 'vdi', 'snapshot', '-s', $snap, $volname);
+    run_command($cmd, errmsg => "sheepdog snapshot $volname' error");
+
+    return undef;
+}
+
 1;
-- 
1.7.2.5



More information about the pve-devel mailing list