[pve-devel] [PATCH 4/6] nexenta: volume_size_info

Alexandre Derumier aderumier at odiso.com
Sun Aug 5 10:16:48 CEST 2012


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

diff --git a/PVE/Storage/NexentaPlugin.pm b/PVE/Storage/NexentaPlugin.pm
index 239a951..523adac 100644
--- a/PVE/Storage/NexentaPlugin.pm
+++ b/PVE/Storage/NexentaPlugin.pm
@@ -314,7 +314,9 @@ sub deactivate_volume {
 sub volume_size_info {
     my ($class, $scfg, $storeid, $volname, $timeout) = @_;
 
-    return undef;
+    my $json = '{"method": "get_child_prop","object" : "zvol","params": ["'.$scfg->{pool}.'/'.$volname.'", "size_bytes"]}';
+    my $size = nexenta_request($scfg, $json);
+    return $size;
 }
 
 1;
-- 
1.7.2.5




More information about the pve-devel mailing list