Setup ZFS on GNU/Linux

Requirements

kernel headers

ls -lF /lib/modules/`uname -r`/build

Ubuntu

apt install build-essential automake libtool
apt install pkg-config zlib1g-dev uuid-dev libblkid-dev libudev-dev libssl-dev

Install

Grab and build the latest release

#git clone --branch zfs-2.0-release https://github.com/openzfs/zfs.git
#cd zfs/

wget https://github.com/openzfs/zfs/archive/zfs-2.0.0.tar.gz
tar xzf zfs-2.0.0.tar.gz
cd zfs-zfs-2.0.0/

#wget https://github.com/openzfs/zfs/archive/zfs-0.8.4.tar.gz
#cd zfs-zfs-0.8.4/

    ./autogen.sh
    ./configure
echo $MAKEFLAGS
make clean
    time make >/dev/null && echo BUILT
    #pro5s 6m44.185s / 6m46.636s / 6m42.308s
    make install >/dev/null && echo INSTALLED
ldconfig
depmod -a

    ls -lhF /lib/modules/`uname -r`/extra/zfs/zfs.ko
modprobe zfs
dmesg | grep ZFS
cat /etc/modules
echo zfs >> /etc/modules

Acceptance

Linux dmesg

ZFS: Loaded module v2.0.0-rc1_19_gb73a8b1dc, ZFS pool version 5000, ZFS filesystem version 5

ZFS: Loaded module v2.0.0-1, ZFS pool version 5000, ZFS filesystem version 5

FreeBSD dmesg

ZFS filesystem version: 5
ZFS storage pool version: features support (5000)

Additional notes

Note ZFS might be nice for vdisks snapshots (hopefully it freezes correctly)

Difference between fsfreeze and lvm snapshot https://unix.stackexchange.com/questions/157033/difference-between-fsfreeze-and-lvm-snapshot

An LVM snapshot of an ext4 fs does not seem very clean https://serverfault.com/questions/539209/an-lvm-snapshot-of-an-ext4-fs-does-not-seem-very-clean

Resources

ZoF https://zfsonfreebsd.github.io/ZoF/ https://github.com/zfsonfreebsd/ZoF

Storage: ZFS https://pve.proxmox.com/wiki/Storage:_ZFS

ZFS on Linux https://pve.proxmox.com/wiki/ZFS_on_Linux

ZFS https://wiki.debian.org/ZFS

ZPool https://wiki.ubuntu.com/ZFS/ZPool

ZFS Without Tears https://www.csparks.com/ZFS%20Without%20Tears.md


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun