Skip to content

Commit

Permalink
zpool import cachefile improvements
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: George Wilson <[email protected]>
Closes openzfs#11716
  • Loading branch information
grwilson authored Mar 12, 2021
1 parent b8fa03e commit 0936981
Show file tree
Hide file tree
Showing 5 changed files with 441 additions and 154 deletions.
Loading

0 comments on commit 0936981

Please sign in to comment.