[pve-devel] [PATCH 3/7] sheepdog : add volume_snapshot
Alexandre Derumier
aderumier at odiso.com
Wed Sep 5 10:08:52 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