]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/ISCSIDirectPlugin.pm
drbd: comment that the builtin plugin is depreacated
[pve-storage.git] / PVE / Storage / ISCSIDirectPlugin.pm
index 66a87adbead52b702427d20d2f934072bf407dad..9777969b39e02ee03c44aca84da332b8bb56a316 100644 (file)
@@ -36,6 +36,7 @@ sub iscsi_ls {
                    $list->{$storeid}->{$image} = {
                        name => $image,
                        size => $size * $unittobytes{$unit},
+                       format => 'raw',
                    };
                }
            });
@@ -56,7 +57,8 @@ sub type {
 
 sub plugindata {
     return {
-        content => [ {images => 1, none => 1}, { images => 1 }],
+       content => [ {images => 1, none => 1}, { images => 1 }],
+       select_existing => 1,
     };
 }
 
@@ -67,6 +69,7 @@ sub options {
         nodes => { optional => 1},
         disable => { optional => 1},
         content => { optional => 1},
+        bwlimit => { optional => 1 },
     };
 }
 
@@ -85,7 +88,10 @@ sub parse_volname {
 }
 
 sub path {
-    my ($class, $scfg, $volname) = @_;
+    my ($class, $scfg, $volname, $storeid, $snapname) = @_;
+
+    die "volume snapshot is not possible on iscsi device"
+       if defined($snapname);
 
     my ($vtype, $lun, $vmid) = $class->parse_volname($volname);
 
@@ -181,12 +187,18 @@ sub deactivate_storage {
 }
 
 sub activate_volume {
-    my ($class, $storeid, $scfg, $volname, $exclusive, $cache) = @_;
+    my ($class, $storeid, $scfg, $volname, $snapname, $cache) = @_;
+
+    die "volume snapshot is not possible on iscsi device" if $snapname;
+
     return 1;
 }
 
 sub deactivate_volume {
-    my ($class, $storeid, $scfg, $volname, $exclusive, $cache) = @_;
+    my ($class, $storeid, $scfg, $volname, $snapname, $cache) = @_;
+
+    die "volume snapshot is not possible on iscsi device" if $snapname;
+
     return 1;
 }