[pve-devel] applied: [PATCH storage] zfs: don't generate/update cachefile on pool import
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Apr 3 12:20:36 CEST 2019
On 4/3/19 11:06 AM, Fabian Grünbichler wrote:
> 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 <f.gruenbichler at proxmox.com>
> ---
> see https://forum.proxmox.com/threads/prevent-proxmox-from-discovering-zfs.52967/ for a likely example of this issue triggering
>
> 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 6e08457..ed22530 100644
> --- a/PVE/Storage/ZFSPoolPlugin.pm
> +++ b/PVE/Storage/ZFSPoolPlugin.pm
> @@ -526,7 +526,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 $@;
>
applied, thanks!
More information about the pve-devel
mailing list