hetzner-dedicated/zfs: Install right version of zfs

This commit is contained in:
Akshay Mankar 2023-10-15 16:35:52 +02:00
parent d33d5f5c6a
commit 4ee03cefd4
Signed by: axeman
GPG key ID: CA08F3AB62369B89

View file

@ -29,10 +29,26 @@
export LC_ALL=C
apt update
apt install -y dpkg-dev linux-headers-$(uname -r) linux-image-amd64 sudo parted zfsutils-linux libssl-dev uuid-dev zlib1g-dev libblkid-dev
apt install -y dpkg-dev linux-headers-$(uname -r) linux-image-amd64 sudo parted libssl-dev uuid-dev zlib1g-dev libblkid-dev
set -euox pipefail
rm -f /usr/local/sbin/zfs
rm -f /usr/local/sbin/zpool
cd "$(mktemp -d)"
# Don't download latest, ZFS 2.2 creates zpool which cannot be loaded by zfs
# 2.1.x
#
# wget "$(curl -Ls https://api.github.com/repos/openzfs/zfs/releases/107594126 | grep -E "browser_download_url.*\.tar.gz\"$"| cut -d '"' -f 4)"
wget https://github.com/openzfs/zfs/releases/download/zfs-2.1.13/zfs-2.1.13.tar.gz
tar xfv zfs*.tar.gz && rm zfs*.tar.gz
cd zfs*
./configure && make -j "$(nproc)"
make install
ldconfig
modprobe zfs
# Inspect existing disks
# Should give you something like
# NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT