UNDER CONSTRUCTION
created: 2017-11-29, last modified: 2017-11-29

Howto build ZFS 0.7.3 from source in Devuan 1.0 (Jessie)

Installing zfs-dkms from backports contrib fails because it needs dkms > 2.2.1.0, but Debian has 2.2.0.3-2.

Thus I tried instead to compile from source, and succeeded with these commands:

# install prerequisites
aptitude install build-essential autoconf libtool gawk alien fakeroot linux-headers-$(uname -r)
aptitude install zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev
aptitude install parted lsscsi ksh

# download source
mkdir /archiv
cd /archiv
wget https://github.com/zfsonlinux/zfs/releases/download/zfs-0.7.3/spl-0.7.3.tar.gz
wget https://github.com/zfsonlinux/zfs/releases/download/zfs-0.7.3/zfs-0.7.3.tar.gz
zcat spl-0.7.3.tar.gz | tar xf -
zcat zfs-0.7.3.tar.gz | tar xf -

# build slp
cd /archiv/spl-0.7.3
sh autogen.sh
./configure
make -s -j$(nproc)
make deb

# build zfs
cd /archiv/zfs-0.7.3
sh autogen.sh
./configure --with-spl=/archiv/spl-0.7.3
make -s -j$(nproc)
make deb

# install
dpkg -i /archiv/spl-0.7.3/spl_0.7.3-1_amd64.deb
dpkg -i /archiv/zfs-0.7.3/zfs_0.7.3-1_amd64.deb
dpkg -i /archiv/zfs-0.7.3/libnvpair1_0.7.3-1_amd64.deb
dpkg -i /archiv/zfs-0.7.3/libuutil1_0.7.3-1_amd64.deb
dpkg -i /archiv/zfs-0.7.3/libzpool2_0.7.3-1_amd64.deb
dpkg -i /archiv/zfs-0.7.3/libzfs2_0.7.3-1_amd64.deb

# load modules
cd /archiv/zfs-0.7.3/scripts
bash zfs.sh

testing ZFS:

mkdir /scratch
for i in {1..3}; do truncate -s 2G /scratch/$i.img; done
zpool create zpool raidz1 /scratch/1.img /scratch/2.img /scratch/3.img
zpool list
zpool status
zfs list

Looks good so far.

The next step is to load the modules in /etc/rc.local


Impressum