The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7261
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 87d16a008b8ce7c6861951268d517a36bee99a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Mon, 27 Apr 2020 13:20:58 -0400 Subject: [PATCH] lxd/init: Auto-detect and use Ubuntu ZFS setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/main_init_interactive.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lxd/main_init_interactive.go b/lxd/main_init_interactive.go index 8c848b4adb..9418e8dc11 100644 --- a/lxd/main_init_interactive.go +++ b/lxd/main_init_interactive.go @@ -506,6 +506,16 @@ func (c *cmdInit) askStoragePool(config *cmdInitData, d lxd.InstanceServer, pool } } + // Optimization for zfs on zfs (when using Ubuntu's bpool/rpool) + if pool.Driver == "zfs" && backingFs == "zfs" { + poolName, _ := shared.RunCommand("zpool", "get", "-H", "-o", "value", "name", "rpool") + if strings.TrimSpace(poolName) == "rpool" && cli.AskBool("Would you like to create a new zfs dataset under rpool/lxd? (yes/no) [default=yes]: ", "yes") { + pool.Config["source"] = "rpool/lxd" + config.Node.StoragePools = append(config.Node.StoragePools, pool) + break + } + } + if cli.AskBool(fmt.Sprintf("Create a new %s pool? (yes/no) [default=yes]: ", strings.ToUpper(pool.Driver)), "yes") { if pool.Driver == "ceph" { // Ask for the name of the cluster
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel