The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6672
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) === Ensures that the storage pool directories are created on LXD start so they are in a consistent state. Some older drivers did not create the storage pool directories at pool create time. Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From f5a96aff05b695c01066766dad7e946e6295a750 Mon Sep 17 00:00:00 2001 From: Thomas Parrott <thomas.parr...@canonical.com> Date: Mon, 6 Jan 2020 10:35:55 +0000 Subject: [PATCH] lxd/storage/backend/lxd: Create storage structure on pool mount Ensures that the storage pool directories are created on LXD start so they are in a consistent state. Some older drivers did not create the storage pool directories at pool create time. Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com> --- lxd/storage/backend_lxd.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lxd/storage/backend_lxd.go b/lxd/storage/backend_lxd.go index 726f69366c..c2b02e819a 100644 --- a/lxd/storage/backend_lxd.go +++ b/lxd/storage/backend_lxd.go @@ -224,6 +224,13 @@ func (b *lxdBackend) Mount() (bool, error) { logger.Debug("Mount started") defer logger.Debug("Mount finished") + // Ensure that the base storage structure directories exist (as some old drivers did not create all dirs). + path := drivers.GetPoolMountPath(b.name) + err := b.createStorageStructure(path) + if err != nil { + return false, err + } + return b.driver.Mount() }
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel