[zfs-discuss] Installing ZoL 0.6.5.4 from source on Debian testing (stretch)
johnbenallen at gmail.com
Sun Jan 24 13:04:16 EST 2016
In an effort to educate myself on how DKMS works, I set up DKMS to install
the spl and zfs kernel modules from source, without creating .deb files.
The sequence was as follows:
1. Export my ZFS pool
2. Remove all traces of ZFS from the test machine, removing existing
packages, deleting modules, removing spl and zfs from the DKMS tree, etc
3. Download the sources into /usr/src
4. Copy over the dkms.conf files from a working installation on Debian
5. Add spl and zfs to the DKMS tree:
dkms add spl/0.6.5.4
dkms add zfs/0.6.5.4
6. Build spl modules:
dkms build spl/0.6.5.4
This worked ok, the modules were installed
7. Build zfs modules:
dkms build zfs/0.6.5.4
At first this did not work. As others have occasionally noted, the
pre_build (./configure) script blocks looking for the spl build directory:
checking spl source directory... /usr/src/spl-0.6.5.4
checking spl build directory...
The explanation appears to be an error in several versions of the dkms.conf
file. This contained the line:
However, on both my Debian machines the build directory has a different
Therefore I changed this line in dkms.conf to:
and the build finished normally, with all the zfs modules installed in
8. Add modules to running kernel:
9. Import the ZFS pool
At this point I realised something that had not been obvious to me before,
namely that DKMS builds the modules but it does not build the ZFS commands
like zpool (as well as quite a few other things like the man pages).
The quick and dirty solution to this was to go into the
directory /usr/src/zfs-0.6.5.4/cmd and do
which resulted in zpool etc being built, and installed in /usr/local/sbin
(different from my jessie machine where they are in /sbin). This allowed me
to import my ZFS pool.
10. Re-enable the ZFS service in systemd
systemctl enable zfs.target
systemctl start zfs
11. Reboot the machine to check that everything comes up OK.
This has been quite an instructive exercise learning about DKMS and as far
as I can tell my ZFS pool is working fine.
However, I have at least 3 questions:
Q1. What is the correct way to build everything except the modules from the
spl and zfs sources? If I just go into /usr/src/spl-0.6.5.4 and
/usr/src/zfs-0.6.5.4 and do a traditional sequence of ./configure, make,
make install, will this not conflict with the compilation and installation
of the kernel modules via DKMS?
Q2. The dkms.conf files seem to contain lines which don't actually do
anything, eg DEST_MODULE_LOCATION="/extra/zfs/zfs" Since DKMS installs
the modules differently, can these lines be removed?
Q3. If one can set up DKMS manually like this, is it still better to use
debs, created for example using Fajar's unofficial packages for 0.6.5.4:
In my experience of Debian in recent years, I have often installed
important software (eg exim, dovecot...) directly from source in order to
get the benefit of up to date versions, and so long as one is prepared to
work directly with the configuration files, it has not been necessary to
create deb packages to do this. Perhaps ZoL is different?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zfs-discuss