[lxc-devel] [lxd/master] zfs: Mount if not mounted
stgraber on Github
lxc-bot at linuxcontainers.org
Thu May 26 22:16:55 UTC 2016
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 370 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160526/052402d0/attachment.bin>
-------------- next part --------------
From 0dc568cd2653c3049376987d08bf3355a627c68d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 26 May 2016 18:12:43 -0400
Subject: [PATCH] zfs: Mount if not mounted
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Closes #1888
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
lxd/storage_zfs.go | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lxd/storage_zfs.go b/lxd/storage_zfs.go
index 8386ed8..d138918 100644
--- a/lxd/storage_zfs.go
+++ b/lxd/storage_zfs.go
@@ -79,6 +79,13 @@ func (s *storageZfs) Init(config map[string]interface{}) (storage, error) {
// Things we don't need to care about
func (s *storageZfs) ContainerStart(container container) error {
+ fs := fmt.Sprintf("containers/%s", container.Name())
+
+ // Just in case the container filesystem got unmounted
+ if !shared.IsMountPoint(shared.VarPath(fs)) {
+ s.zfsMount(fs)
+ }
+
return nil
}
More information about the lxc-devel
mailing list