]> git.datanom.net - omvzfs.git/blobdiff - src/Zpool.php
Made it possible to force create Vdevs.
[omvzfs.git] / src / Zpool.php
index 87e5f0cb4637e88badb4eab36aa32e394e896469..56ec8c64d4426e98d239710d5e3d8b70448c24d5 100644 (file)
@@ -192,11 +192,11 @@ class OMVModuleZFSZpool extends OMVModuleAbstract {
      * @throws OMVModuleZFSException
      * @access public
      */
-    public function addVdev(array $vdevs) {
-               $cmd = "zpool add " . $this->name . " " . $this->getCommandString($vdevs);
+    public function addVdev(array $vdevs, $opts= "") {
+               $cmd = "zpool add " . $this->name . " " . $opts . $this->getCommandString($vdevs) . " 2>&1";
                OMVUtil::exec($cmd, $output, $result);
                if ($result)
-                       throw new OMVModuleZFSException($output);
+                       throw new OMVModuleZFSException(implode("\n", $output));
                else
                        $this->vdevs = array_merge($this->vdevs, $vdevs);
                $this->size = $this->getAttribute("size");
This page took 0.029289 seconds and 5 git commands to generate.