X-Git-Url: http://git.datanom.net/omvzfs.git/blobdiff_plain/d5f2a5099bed3fbe461aadeb763978b22c5ae383..a238c1a16ee1162aa28919ea82d20b83a69c03c1:/src/Zpool.php?ds=sidebyside diff --git a/src/Zpool.php b/src/Zpool.php index 87e5f0c..56ec8c6 100644 --- a/src/Zpool.php +++ b/src/Zpool.php @@ -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");