xref: /freebsd/sys/contrib/openzfs/etc/default/zfs.in (revision 681ce946f33e75c590e97c53076e86dff1fe8f4a)
1*681ce946SMartin Matuska# OpenZFS userland configuration.
2eda14cbcSMatt Macy
3eda14cbcSMatt Macy# NOTE: This file is intended for sysv init and initramfs.
4eda14cbcSMatt Macy# Changing some of these settings may not make any difference on
5eda14cbcSMatt Macy# systemd-based setup, e.g. setting ZFS_MOUNT=no will not prevent systemd
6eda14cbcSMatt Macy# from launching zfs-mount.service during boot.
7eda14cbcSMatt Macy# See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901436
8eda14cbcSMatt Macy
9eda14cbcSMatt Macy# To enable a boolean setting, set it to yes, on, true, or 1.
10eda14cbcSMatt Macy# Anything else will be interpreted as unset.
11*681ce946SMartin Matuska# shellcheck disable=SC2034
12*681ce946SMartin Matuska
13*681ce946SMartin Matuska# Run `zfs load-key` during system start?
14*681ce946SMartin MatuskaZFS_LOAD_KEY='yes'
15*681ce946SMartin Matuska
16*681ce946SMartin Matuska# Run `zfs unload-key` during system stop?
17*681ce946SMartin MatuskaZFS_UNLOAD_KEY='no'
18eda14cbcSMatt Macy
19eda14cbcSMatt Macy# Run `zfs mount -a` during system start?
20eda14cbcSMatt MacyZFS_MOUNT='yes'
21eda14cbcSMatt Macy
22eda14cbcSMatt Macy# Run `zfs unmount -a` during system stop?
23eda14cbcSMatt MacyZFS_UNMOUNT='yes'
24eda14cbcSMatt Macy
25eda14cbcSMatt Macy# Run `zfs share -a` during system start?
26eda14cbcSMatt Macy# nb: The shareiscsi, sharenfs, and sharesmb dataset properties.
27eda14cbcSMatt MacyZFS_SHARE='yes'
28eda14cbcSMatt Macy
29eda14cbcSMatt Macy# Run `zfs unshare -a` during system stop?
30eda14cbcSMatt MacyZFS_UNSHARE='yes'
31eda14cbcSMatt Macy
32eda14cbcSMatt Macy# By default, a verbatim import of all pools is performed at boot based on the
33eda14cbcSMatt Macy# contents of the default zpool cache file.  The contents of the cache are
34eda14cbcSMatt Macy# managed automatically by the 'zpool import' and 'zpool export' commands.
35eda14cbcSMatt Macy#
36eda14cbcSMatt Macy# By setting this to 'yes', the system will instead search all devices for
37eda14cbcSMatt Macy# pools and attempt to import them all at boot, even those that have been
38eda14cbcSMatt Macy# exported.  Under this mode, the search path can be controlled by the
39eda14cbcSMatt Macy# ZPOOL_IMPORT_PATH variable and a list of pools that should not be imported
40eda14cbcSMatt Macy# can be listed in the ZFS_POOL_EXCEPTIONS variable.
41eda14cbcSMatt Macy#
42eda14cbcSMatt Macy# Note that importing all visible pools may include pools that you don't
43eda14cbcSMatt Macy# expect, such as those on removable devices and SANs, and those pools may
44eda14cbcSMatt Macy# proceed to mount themselves in places you do not want them to.  The results
45eda14cbcSMatt Macy# can be unpredictable and possibly dangerous.  Only enable this option if you
46eda14cbcSMatt Macy# understand this risk and have complete physical control over your system and
47eda14cbcSMatt Macy# SAN to prevent the insertion of malicious pools.
48eda14cbcSMatt MacyZPOOL_IMPORT_ALL_VISIBLE='no'
49eda14cbcSMatt Macy
50eda14cbcSMatt Macy# Specify specific path(s) to look for device nodes and/or links for the
51eda14cbcSMatt Macy# pool import(s). See zpool(8) for more information about this variable.
52eda14cbcSMatt Macy# It supersedes the old USE_DISK_BY_ID which indicated that it would only
53eda14cbcSMatt Macy# try '/dev/disk/by-id'.
54eda14cbcSMatt Macy# The old variable will still work in the code, but is deprecated.
55eda14cbcSMatt Macy#ZPOOL_IMPORT_PATH="/dev/disk/by-vdev:/dev/disk/by-id"
56eda14cbcSMatt Macy
57eda14cbcSMatt Macy# List of pools that should NOT be imported at boot
58eda14cbcSMatt Macy# when ZPOOL_IMPORT_ALL_VISIBLE is 'yes'.
59eda14cbcSMatt Macy# This is a space separated list.
60eda14cbcSMatt Macy#ZFS_POOL_EXCEPTIONS="test2"
61eda14cbcSMatt Macy
62eda14cbcSMatt Macy# Should the datasets be mounted verbosely?
63eda14cbcSMatt Macy# A mount counter will be used when mounting if set to 'yes'.
64eda14cbcSMatt MacyVERBOSE_MOUNT='no'
65eda14cbcSMatt Macy
66eda14cbcSMatt Macy# Should we allow overlay mounts?
67eda14cbcSMatt Macy# This is standard in Linux, but not ZFS which comes from Solaris where this
68eda14cbcSMatt Macy# is not allowed).
69eda14cbcSMatt MacyDO_OVERLAY_MOUNTS='no'
70eda14cbcSMatt Macy
71eda14cbcSMatt Macy# Any additional option to the 'zfs import' commandline?
72eda14cbcSMatt Macy# Include '-o' for each option wanted.
73eda14cbcSMatt Macy# You don't need to put '-f' in here, unless you want it ALL the time.
74eda14cbcSMatt Macy# Using the option 'zfsforce=1' on the grub/kernel command line will
75eda14cbcSMatt Macy# do the same, but on a case-to-case basis.
76eda14cbcSMatt MacyZPOOL_IMPORT_OPTS=""
77eda14cbcSMatt Macy
78eda14cbcSMatt Macy# Full path to the ZFS cache file?
79eda14cbcSMatt Macy# See "cachefile" in zpool(8).
80eda14cbcSMatt Macy# The default is "@sysconfdir@/zfs/zpool.cache".
81eda14cbcSMatt Macy#ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache"
82eda14cbcSMatt Macy#
83eda14cbcSMatt Macy# Setting ZPOOL_CACHE to an empty string ('') AND setting ZPOOL_IMPORT_OPTS to
84eda14cbcSMatt Macy# "-c @sysconfdir@/zfs/zpool.cache" will _enforce_ the use of a cache file.
85eda14cbcSMatt Macy# This is needed in some cases (extreme amounts of VDEVs, multipath etc).
86eda14cbcSMatt Macy# Generally, the use of a cache file is usually not recommended on Linux
87eda14cbcSMatt Macy# because it sometimes is more trouble than it's worth (laptops with external
88eda14cbcSMatt Macy# devices or when/if device nodes changes names).
89eda14cbcSMatt Macy#ZPOOL_IMPORT_OPTS="-c @sysconfdir@/zfs/zpool.cache"
90eda14cbcSMatt Macy#ZPOOL_CACHE=""
91eda14cbcSMatt Macy
92eda14cbcSMatt Macy# Any additional option to the 'zfs mount' command line?
93eda14cbcSMatt Macy# Include '-o' for each option wanted.
94eda14cbcSMatt MacyMOUNT_EXTRA_OPTIONS=""
95eda14cbcSMatt Macy
96eda14cbcSMatt Macy# Build kernel modules with the --enable-debug switch?
97eda14cbcSMatt Macy# Only applicable for Debian GNU/Linux {dkms,initramfs}.
98eda14cbcSMatt MacyZFS_DKMS_ENABLE_DEBUG='no'
99eda14cbcSMatt Macy
100eda14cbcSMatt Macy# Build kernel modules with the --enable-debuginfo switch?
101eda14cbcSMatt Macy# Only applicable for Debian GNU/Linux {dkms,initramfs}.
102eda14cbcSMatt MacyZFS_DKMS_ENABLE_DEBUGINFO='no'
103eda14cbcSMatt Macy
104eda14cbcSMatt Macy# Keep debugging symbols in kernel modules?
105eda14cbcSMatt Macy# Only applicable for Debian GNU/Linux {dkms,initramfs}.
106eda14cbcSMatt MacyZFS_DKMS_DISABLE_STRIP='no'
107eda14cbcSMatt Macy
108eda14cbcSMatt Macy# Optional arguments for the ZFS Event Daemon (ZED).
109eda14cbcSMatt Macy# See zed(8) for more information on available options.
110eda14cbcSMatt Macy#ZED_ARGS="-M"
111