zfs: don't generate/update cachefile on pool import
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@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
cdef3abb25
commit
c6f1315524
@ -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 $@;
|
||||
|
||||
Reference in New Issue
Block a user