OpenZFS on Linux and FreeBSD
Go to file
Brian Behlendorf e3fb781c5f Add kernel module auto-loading
Historically a dynamic misc minor number was registered for the
/dev/zfs device in order to prevent minor number collisions.  This
was fine but it prevented us from being able to use the kernel
module auto-loaded which requires a known reserved value.

Resolve this issue by adding a configure test to find an available
misc minor number which can then be used in MODULE_ALIAS_MISCDEV at
build time.  By adding this alias the zfs kmod is added to the list
of known static-nodes and the systemd-tmpfiles-setup-dev service
will create a /dev/zfs character device at boot time.

This in turn allows us to update the 90-zfs.rules file to make it
aware this is a static node.  The upshot of this is that whenever
a process (zpool, zfs, zed) opens the /dev/zfs the kmods will be
automatic loaded.  This even works for unprivileged users so there
is no longer a need to manually load the modules at boot time.

As an additional bonus the zed now no longer needs to start after
the zfs-import.service since it will trigger the module load.

In the unlikely event the minor number we selected conflicts with
another out of tree unregistered minor number the code falls back
to dynamically allocating it.  In this case the modules again
must be manually loaded.

Note that due to the change in the method of registering the minor
number the zimport.sh test case may incorrectly fail when the
static node for the installed packages is created instead of the
dynamic one.  This issue will only transiently impact zimport.sh
for this single commit when we transition and are mixing and
matching methods.

Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
TEST_ZIMPORT_SKIP="yes"
Closes #7287
2019-02-22 09:47:34 -08:00
.github Update codecov.yml 2018-03-14 16:10:36 -07:00
cmd Honor --with-mounthelperdir where applicable 2019-02-22 09:47:34 -08:00
config Add kernel module auto-loading 2019-02-22 09:47:34 -08:00
contrib Honor --with-mounthelperdir where applicable 2019-02-22 09:47:34 -08:00
etc Add kernel module auto-loading 2019-02-22 09:47:34 -08:00
include OpenZFS 9577 - remove zfs_dbuf_evict_key tsd 2019-02-22 09:47:34 -08:00
lib Add kernel module auto-loading 2019-02-22 09:47:34 -08:00
man OpenZFS 8906 - uts: illumos rootfs should support salted cksum 2018-07-06 02:46:51 -07:00
module Add kernel module auto-loading 2019-02-22 09:47:34 -08:00
rpm Add kernel module auto-loading 2019-02-22 09:47:34 -08:00
scripts Support Debian DKMS builds 2018-07-06 02:46:51 -07:00
tests ZTS: Update O_TMPFILE support check 2018-11-08 14:38:28 -08:00
udev Add kernel module auto-loading 2019-02-22 09:47:34 -08:00
.gitignore Add configure option to enable gcov analysis 2018-03-14 16:10:36 -07:00
.gitmodules Add zimport.sh compatibility test script 2014-02-21 12:10:31 -08:00
AUTHORS Add a missing > to AUTHORS 2014-09-02 14:18:53 -07:00
COPYRIGHT Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
DISCLAIMER Fix minor typos and update marketing copy. 2013-03-21 12:51:06 -07:00
META Tag zfs-0.7.12 2018-11-08 14:38:37 -08:00
Makefile.am Add support for "--enable-code-coverage" option 2018-03-14 16:10:36 -07:00
OPENSOLARIS.LICENSE Add CDDL license file 2008-12-01 14:49:34 -08:00
README.markdown Update codecov.yml 2018-03-14 16:10:36 -07:00
TEST Retire filebench testing 2017-06-01 06:24:28 -07:00
autogen.sh build: do not call boilerplate ourself 2013-04-02 10:55:20 -07:00
configure.ac contrib/initramfs: switch to automake 2019-02-22 09:47:33 -08:00
copy-builtin Allow c99 when building ZFS in the kernel tree 2017-03-27 12:31:15 -07:00
zfs-script-config.sh.in zpool iostat/status -c improvements 2017-06-05 10:52:15 -07:00
zfs.release.in Move zfs.release generation to configure step 2012-07-12 12:22:51 -07:00

README.markdown

img

ZFS on Linux is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the OpenZFS community.

codecov

Official Resources

Installation

Full documentation for installing ZoL on your favorite Linux distribution can be found at our site.

Contribute & Develop

We have a separate document with contribution guidelines.