Debian

Installation

If you want to use ZFS as your root filesystem, see the Root on ZFS links below instead.

ZFS packages are included in the contrib repository. The backports repository often provides newer releases of ZFS. You can use it as follows.

Add the backports repository:

vi /etc/apt/sources.list.d/buster-backports.list
deb http://deb.debian.org/debian buster-backports main contrib
deb-src http://deb.debian.org/debian buster-backports main contrib
vi /etc/apt/preferences.d/90_zfs
Package: libnvpair1linux libuutil1linux libzfs2linux libzpool2linux spl-dkms zfs-dkms zfs-test zfsutils-linux zfsutils-linux-dev zfs-zed
Pin: release n=buster-backports
Pin-Priority: 990

Install the packages:

apt update
apt install dpkg-dev linux-headers-$(uname -r) linux-image-amd64
apt install zfs-dkms zfsutils-linux