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