Currently, the latest version of ZFSonLinux for Debian Stretch backport is 0.7.12. However, it is an old version. The current stable upstream is on version 0.8.3. Everyone is focused on updating it for Debian Buster but not for Stretch.
There are a lot of features that were included in version 0.8. Let's install the latest version in Stretch.
Install dependencies
apt-get update apt-get -y install build-essential autoconf automake libtool gawk alien apt-get -y install fakeroot || true apt-get -y install dkms libblkid-dev uuid-dev libudev-dev libssl-dev apt-get -y install zlib1g-dev libaio-dev libattr1-dev libelf-dev apt-get -y install linux-headers-$(uname -r) apt-get -y install python3 python3-dev python3-setuptools python3-cffi libffi-dev
Build deb packages
Get the latest version from https://github.com/openzfs/zfs/releases and build deb packages of ZFSonLinux.
wget https://github.com/openzfs/zfs/releases/download/zfs-0.8.3/zfs-0.8.3.tar.gz tar -vxzf zfs-0.8.3.tar.gz cd zfs-0.8.3 ./configure --with-config=srpm make -j1 pkg-utils deb-dkms
After the build is complete, you will get the following *.deb files:
- libnvpair1_0.8.3-1_amd64.deb
- libuutil1_0.8.3-1_amd64.deb
- libzfs2_0.8.3-1_amd64.deb
- libzfs2-devel_0.8.3-1_amd64.deb
- libzpool2_0.8.3-1_amd64.deb
- python3-pyzfs_0.8.3-1_amd64.deb
- zfs_0.8.3-1_amd64.deb
- zfs-dkms_0.8.3-1_amd64.deb
- zfs-dracut_0.8.3-1_amd64.deb
- zfs-initramfs_0.8.3-1_amd64.deb
- zfs-test_0.8.3-1_amd64.deb
Install deb packages
Install all the deb packages.
for file in *.deb; do dpkg -i $file; done
Check version installed
modinfo zfs | grep ^version # version: 0.8.3-1