]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/LunCmd/Comstar.pm
Added "nowritecache" option to ZFS storage plugin. Turns off write caching on Comstar...
[pve-storage.git] / PVE / Storage / LunCmd / Comstar.pm
index 45ad6a583dd31b2526923250e81d40ea0cca6f42..aa1c61439ab4246affd47d66fc743508ef8bdc57 100644 (file)
@@ -50,11 +50,15 @@ sub run_lun_command {
     };
 
     if ($method eq 'create_lu') {
+        my $wcd = 'false'; 
+        if ($scfg->{nowritecache}) {
+          $wcd = 'true';
+       }
         my $prefix = '600144f';
         my $digest = md5_hex($params[0]);
         $digest =~ /(\w{7}(.*))/;
         $guid = "$prefix$2";
-        @params = ('-p', 'wcd=false', '-p', "guid=$guid", @params);
+        @params = ('-p', "wcd=$wcd", '-p', "guid=$guid", @params);
     } elsif ($method eq 'modify_lu') {
         @params = ('-s', @params);
     } elsif ($method eq 'list_view') {