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