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