OBSOLETED, REPLACED BY: LINK
Notes: For Debian 10: it is not required to remove packages prior to install of 2.0 unless a previous version of ZFS was installed on the machine. Read the last command of this guide before continuing.
Note2: If you are using your proxmox host for GPU passthrough it is adviced to set options zfs l2arc_mfuonly = 1 to not fill the cache with all sorts of crap if you are doing backups. It will most likely trash your SSD unless it is enterprise grade SLC within a few weeks.
Note3: This does NOT work for a proxmox or debian install with a root zfs pool!!!!!!!!!
WARNING: NOT SAFE FOR PRODUCTION
Here are the commands to enter in order for persistent l2arc to work with proxmox (debian based)
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get install build-essential autoconf automake libtool gawk alien fakeroot dkms libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev pve-headers python3 python3-dev python3-setuptools python3-cffi libffi-dev git
git clone https://github.com/zfsonlinux/zfs
cd zfs
git checkout zfs-2.0.0-rc
6
sh autogen.sh
./configure
make deb
apt-get remove zfs zfs-dkms libzfs2 libzpool2 libnvpair1linux libzfs2linux libzpool2linux libuutil1linux
dpkg -i zfs_2.0.0-0_amd64.deb zfs-dkms_2.0.0-0_amd64.deb libnvpair3_2.0.0-0_amd64.deb libzfs4_2.0.0-0_amd64.deb libzpool4_2.0.0-0_amd64.deb libuutil3_2.0.0-0_amd64.deb zfs-test_2.0.0-0_amd64.deb zfs-dracut_2.0.0-0_amd64.deb zfs-initramfs_2.0.0-0_amd64.deb python3-pyzfs_2.0.0-0_amd64.deb
apt-get install zfsutils-linux
Last command removes some of the 2.0 installed packages but without this the pool wont mount on reboot. It does not limit the functionality of ZFS.
Read this for reason: https://github.com/openzfs/zfs/issues/10941