From c6f1315524b47678ea00d12c8f4bfb6041245bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 3 Apr 2019 11:06:07 +0200 Subject: [PATCH] zfs: don't generate/update cachefile on pool import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit during storage activation. for pools that don't get imported at boot (e.g. because their vdevs are not available when zfs-import-*.service runs) it is fatal to include them in the cachefile, for those that do get imported at boot this code should never run anyway as they are already imported. in any case, a fallback to import without cachefile is the safe variant. Signed-off-by: Fabian Grünbichler --- PVE/Storage/ZFSPoolPlugin.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm index 4bf6d50..4f16351 100644 --- a/PVE/Storage/ZFSPoolPlugin.pm +++ b/PVE/Storage/ZFSPoolPlugin.pm @@ -531,7 +531,7 @@ sub activate_storage { if ($@ || !defined($res) || $res !~ $pool) { eval { - @param = ('-d', '/dev/disk/by-id/', "$pool"); + @param = ('-d', '/dev/disk/by-id/', '-o', 'cachefile=none', "$pool"); $class->zfs_request($scfg, undef, 'zpool_import', @param); }; die "could not activate storage '$storeid', $@\n" if $@;