]> git.datanom.net - omvzfs.git/blobdiff - gui/rpc/zfs.inc
Support force create pools.
[omvzfs.git] / gui / rpc / zfs.inc
index 28902edc860a1c565744dc430d5fea19d1fb828a..3bc3ec117d4fca266e5b056add8f5eb38dfc8aff 100644 (file)
@@ -54,9 +54,14 @@ class OMVRpcServiceZFS extends OMVRpcServiceAbstract {
                        throw new OMVModuleZFSException("Incorrect pool type specified");
                        break;
                }
+               //Check for user supplied options
+               $opts = "";
+               if ($params['force']) {
+                       $opts .= "-f ";
+               }
                $disks = preg_split("/[,;]/", $params['devices']);
                $vdev = new OMVModuleZFSVdev($params['name'], $pooltype, $disks);
-               $pool = new OMVModuleZFSZpool($vdev);
+               $pool = new OMVModuleZFSZpool($vdev, $opts);
                //Ugly fix to solve the problem of blkid not displaying info on newly created pools
                $pool->export();
                $pool->import($pool->getName());
This page took 0.032457 seconds and 5 git commands to generate.