From: Niclas Berglind Date: Sat, 13 Sep 2014 06:58:39 +0000 (+0200) Subject: Add option to set mountpoint when creating pool. X-Git-Url: http://git.datanom.net/omvzfs.git/commitdiff_plain/c6117b32379445101780af97836973ba9151cac7?ds=inline Add option to set mountpoint when creating pool. Signed-off-by: Niclas Berglind --- diff --git a/gui/js/omv/module/admin/storage/zfs/Overview.js b/gui/js/omv/module/admin/storage/zfs/Overview.js index 22f74db..f235799 100644 --- a/gui/js/omv/module/admin/storage/zfs/Overview.js +++ b/gui/js/omv/module/admin/storage/zfs/Overview.js @@ -136,6 +136,14 @@ Ext.define("OMV.module.admin.storage.zfs.AddPool", { flex: 1 }] } + },{ + xtype: "textfield", + name: "mountpoint", + fieldLabel: _("Mountpoint"), + plugins: [{ + ptype: "fieldinfo", + text: _("Optional mountpoint for the pool. Default is to use pool name.") + }] },{ xtype: "checkbox", name: "force", diff --git a/gui/rpc/zfs.inc b/gui/rpc/zfs.inc index 3bc3ec1..16b5a13 100644 --- a/gui/rpc/zfs.inc +++ b/gui/rpc/zfs.inc @@ -59,6 +59,10 @@ class OMVRpcServiceZFS extends OMVRpcServiceAbstract { if ($params['force']) { $opts .= "-f "; } + if (strlen($params['mountpoint']) > 0) { + $opts .= "-m " . $params['mountpoint'] . " "; + } + $disks = preg_split("/[,;]/", $params['devices']); $vdev = new OMVModuleZFSVdev($params['name'], $pooltype, $disks); $pool = new OMVModuleZFSZpool($vdev, $opts);