[lxc-devel] [lxd/master] lxd/daemon: Ignore .zfs in volumes
stgraber on Github
lxc-bot at linuxcontainers.org
Fri Apr 10 18:54:41 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200410/81f748fd/attachment.bin>
-------------- next part --------------
From 0933af7060e2b45b350ee9d73b2f04e4b45436cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 10 Apr 2020 14:54:29 -0400
Subject: [PATCH] lxd/daemon: Ignore .zfs in volumes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
lxd/daemon_storage.go | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lxd/daemon_storage.go b/lxd/daemon_storage.go
index 3f4d5118d8..74a9671812 100644
--- a/lxd/daemon_storage.go
+++ b/lxd/daemon_storage.go
@@ -144,10 +144,16 @@ func daemonStorageValidate(s *state.State, target string) error {
for _, entry := range entries {
entryName := entry.Name()
+ // Don't fail on clean ext4 volumes.
if entryName == "lost+found" {
continue
}
+ // Don't fail on systems with snapdir=visible.
+ if entryName == ".zfs" {
+ continue
+ }
+
return fmt.Errorf("Storage volume %q isn't empty", target)
}
More information about the lxc-devel
mailing list