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