---
 PVE/Storage.pm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/PVE/Storage.pm b/PVE/Storage.pm
index 140f8ae..044e866 100755
--- a/PVE/Storage.pm
+++ b/PVE/Storage.pm
@@ -1270,4 +1270,24 @@ sub complete_volume {
     return $res;
 }
 
+sub is_image_on_zfs {
+    my ($volid) = @_;
+
+    my ($storeid, $volname) = parse_volume_id($volid);
+
+    my $storecfg = config();
+    my $path = $storecfg->{ids}->{$storeid}->{path};
+    my $zfs = 0;
+
+    my $is_zfs = sub{
+       my ($line) = shift @_;
+
+       $zfs = 1 if ($line =~ m/ zfs /);
+    };
+
+    PVE::Tools::run_command("df -T $path", 'timeout' => 5, 'outfunc' => 
$is_zfs);
+
+    return $zfs;
+}
+
 1;
-- 
2.1.4


_______________________________________________
pve-devel mailing list
[email protected]
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to