Cheap VPS & Xen Server

Residential Proxy Network - Hourly & Monthly Packages

Native ZFS On Ubuntu

This guide explains how to set up native ZFS on Ubuntu / Linux. It was tested with Linux 2.6.35-24-generic #42-Ubuntu SMP x86_64 GNU/Linux on Ubuntu 10.10 but should also work on Ubuntu 10.04.

Make sure the following packages are installed:

  • build-essential
  • gawk
  • zlib1g-dev
  • uuid-dev

or install them with:

sudo apt-get install build-essential gawk zlib1g-dev uuid-dev

Now you are prepared to install SPL and ZFS from

sudo cd /usr/src

Download the latest release, e.g.:

sudo wget

sudo wget

Build SPL (you will need it later to compile the ZFS source):

sudo tar -xvzf spl-0.5.2.tar.gz

sudo cd spl-0.5.2/

sudo ./configure

sudo make

sudo make install

Build ZFS:

cd ..

sudo tar -xvzf zfs-0.5.2.tar.gz

sudo cd zfs-0.5.2/ sudo ./configure

sudo make

sudo make install

See if splat is working and the zfs modules are loaded:

sudo modprobe splat

sudo splat -a

sudo modprobe zfs

lsmod |grep zfs

Thats it – you might think that because of an missing path in the LD_LIBRARY_PATH all zfs commands will fail with an error like this:

zfs: error while loading shared libraries: cannot open shared object file: No such file or directory

To fix it add the following line to your environment:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

Ready – Enjoy!