-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zfs-import: Use cache file to reimport pools at boot
This change modifies the import service to use the default cache file to reimport pools at boot. This fixes code that exhaustively searched the entire system and imported all visible pools. Using the cache file is in keeping with the way ZFS has always worked, and is how it is written in the man page (zpool(1M,8)): All pools in this cache are automatically imported when the system boots. Importantly, the cache contains important information for importing multipath devices, and helps control which pools get imported in more dynamic environments like SANs, which may have thousands of visible and constantly changing pools, which the ZFS_POOL_EXCEPTIONS variable is not equipped to handle. The change also stops the service from exporting pools at shutdown. Exporting pools is only meant to be performed by the administrator of the system. Closes #3777 Closes #3526
- Loading branch information
1 parent
7a27ad0
commit f135bb1
Showing
2 changed files
with
11 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f135bb1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am okay with leaving @FransUrbo's code as an optional function. Some people might want things to work this way. That said, it should not be done this way by default.
f135bb1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f135bb1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If (when?) we've decided to change the default of
cachefile
, it would make sense to change the default import way to. Or vice versa if you like (which is what I'm doing with #3526).Considering that there's a good, functional way to make sure one ONLY uses a cache file to do the import, there is no point in changing the init script.