"path":{"type":"string"},
"name":{"type":"string"},
"size":{"type":"string"},
- "clonename":{"type":"string"}
+ "clonename":{"type":"string"},
+ "mountpoint":{"type":"string"}
}
}');
switch ($params['type']) {
case "filesystem":
$name = $params['path'] . "/" . $params['name'];
$tmp = new OMVModuleZFSDataset($name);
+ if (strlen($params['mountpoint']) > 0) {
+ $properties = array("mountpoint"=>$params['mountpoint']);
+ $tmp->setProperties($properties);
+ }
break;
case "snapshot":
$name = $params['path'] . "@" . $params['name'];
$cmd = "zfs get all {$params['name']}";
break;
case "Pool":
- $output .= "Pool details (zpool get all):\n\r\n\r";
+ $output .= "Pool status (zpool status):\n\r\n\r";
+ $cmd = "zpool status {$params['name']}";
+ OMVModuleZFSUtil::exec($cmd,$out,$res);
+ $output .= implode("\n\r", $out);
+ unset($out);
+ $output .= "\n\r\n\rPool details (zpool get all):\n\r\n\r";
$cmd = "zpool get all {$params['name']}";
+ OMVModuleZFSUtil::exec($cmd,$out,$res);
+ $output .= implode("\n\r", $out);
+ unset($out);
+ $output .= "\n\r\n\rPool filesystem details (zfs get all):\n\r\n\r";
+ $cmd = "zfs get all {$params['name']}";
break;
default:
throw new OMVModuleZFSException("Incorrect type provided");