HomeFreeBSD

zpool import cachefile improvements

Description

zpool import cachefile improvements

Importing a pool using the cachefile is ideal to reduce the time
required to import a pool. However, if the devices associated with
a pool in the cachefile have changed, then the import would fail.
This can easily be corrected by doing a normal import which would
then read the pool configuration from the labels.

The goal of this change is make importing using a cachefile more
resilient and auto-correcting. This is accomplished by having
the cachefile import logic automatically fallback to reading the
labels of the devices similar to a normal import. The main difference
between the fallback logic and a normal import is that the cachefile
import logic will only look at the device directories that were
originally used when the cachefile was populated. Additionally,
the fallback logic will always import by guid to ensure that only
the pools in the cachefile would be imported.

External-issue: DLPX-71980
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Wilson <gwilson@delphix.com>
Closes #11716

Details

Provenance
George Wilson <george.wilson@delphix.com>Authored on Mar 12 2021, 11:42 PM
GitHub <noreply@github.com>Committed on Mar 12 2021, 11:42 PM
Parents
rGb8fa03efbc72: Fix whitespace introduced in ecc277cff
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG0936981d8698: zpool import cachefile improvements (authored by George Wilson <george.wilson@delphix.com>).Mar 12 2021, 11:42 PM