From c6117b32379445101780af97836973ba9151cac7 Mon Sep 17 00:00:00 2001 From: Niclas Berglind Date: Sat, 13 Sep 2014 08:58:39 +0200 Subject: [PATCH] Add option to set mountpoint when creating pool. Signed-off-by: Niclas Berglind --- gui/js/omv/module/admin/storage/zfs/Overview.js | 8 ++++++++ gui/rpc/zfs.inc | 4 ++++ 2 files changed, 12 insertions(+) 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); -- 2.39.2