]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/ZFSPlugin.pm
plugins: allow limiting the number of protected backups per guest
[pve-storage.git] / PVE / Storage / ZFSPlugin.pm
index 383f0a0cde932da5ce34d792aafb7206517b74ee..d4dc2a47a5ae363bf955c3fedbf15c09a9bba966 100644 (file)
@@ -159,7 +159,11 @@ sub zfs_get_lun_number {
 
     die "could not find lun_number for guid $guid" if !$guid;
 
-    return $class->zfs_request($scfg, undef, 'list_view', $guid);
+    if ($class->zfs_request($scfg, undef, 'list_view', $guid) =~ /^(\d+)$/) {
+       return $1;
+    }
+
+    die "lun_number for guid $guid is not a number";
 }
 
 # Configuration
@@ -289,7 +293,7 @@ sub alloc_image {
     
     die "unsupported format '$fmt'" if $fmt ne 'raw';
 
-    die "illegal name '$name' - sould be 'vm-$vmid-*'\n"
+    die "illegal name '$name' - should be 'vm-$vmid-*'\n"
     if $name && $name !~ m/^vm-$vmid-/;
 
     my $volname = $name;
@@ -387,12 +391,6 @@ sub volume_has_feature {
     return undef;
 }
 
-sub volume_snapshot_list {
-    my ($class, $scfg, $storeid, $volname) = @_;
-    # return an empty array if dataset does not exist.
-    die "Volume_snapshot_list is not implemented for ZFS over iSCSI.\n";
-}
-
 sub activate_storage {
     my ($class, $storeid, $scfg, $cache) = @_;