freebsd-dev/etc
James Lee 33df62d052 zfs-import: Perform verbatim import using cache file
This change modifies the import service to use the default cache file
to perform a verbatim import of pools at boot.  This fixes code that
searches all devices and imported all visible pools.

Using the cache file is in keeping with the way ZFS has always worked,
how Solaris, Illumos, FreeBSD, and systemd performs imports, 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.  Verbatim imports prevent rogue pools from
being automatically imported and mounted where they shouldn't be.

The change also stops the service from exporting pools at shutdown.
Exporting pools is only meant to be performed explicitly by the
administrator of the system.

The old behavior of searching and importing all visible pools is
preserved and can be switched on by heeding the warning and toggling
the ZPOOL_IMPORT_ALL_VISIBLE variable in /etc/default/zfs.

Signed-off-by: James Lee <jlee@thestaticvoid.com>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3777
Closes #3526
2015-10-13 10:37:05 -07:00
..
init.d zfs-import: Perform verbatim import using cache file 2015-10-13 10:37:05 -07:00
modules-load.d Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00
systemd Rename 'zed.service' to 'zfs-zed.service' 2015-10-02 17:33:32 -04:00
zfs vdev_id: support per-channel slot mappings 2014-01-17 11:17:54 -08:00
Makefile.am Add systemd unit files for ZFS startup 2014-02-05 12:25:30 -08:00