Install ZFS on Debian Testing (Jessie)

I’ve been using ZFS on Linux to provide ZFS functionality on Linux for sometime now. I first became attached to the feature set of ZFS while maintaining Sun Solaris systems a few years ago. I mostly manage a variety of Linux systems now and have found ZFS on Linux to be stable enough for my development work. Though, many folks are using it in production very successfully!

As a matter of fact, Jim Salter wrote the following on Ars Technica recently referencing ZFS on Linux:

I’ve been using ZFS professionally and in production for over five years, and I can honestly say that it’s both changed the course of my career and my business. I wouldn’t dream of going back to the way I did things before ZFS.

That’s quite a ringing endorsement but Jim has many more things to say about ZFS and its strong and weak points. I found myself nodding my head throughout most of it. The article is well worth a read.

As an aside, you can watch the maintainer of ZFS on Linux, Brian Belendorf of LLNL, give a talk at Joyent’s ZFS Day on his motivations to write ZFS on Linux. His talk begins at 31:40 here.

Since my Linux distro of choice for development boxes is Debian testing (Jessie), I hoped the installation for Debian stable (Wheezy) described on this page would work. Unfortunately, there is an issue with ZFS on Linux version 0.6.2 running kernels greater than 3.12. Basically, a new API was introduced to the Linux kernel that is incompatible with ZFS on Linux. The incompatibility has been fixed, but the official ZFS on Linux release hasn’t been updated.

Unfortunately, this bug prevents ZFS on Linux from compiling and installing the kernel module on Debian testing. I have tested the instructions on Debian stable and found it works perfectly. The following steps are only necessary for folks who want to run Debian testing (or above).

I decided to take the leap and run bleeding edge ZFS on Linux on my Debian testing systems. Note that this is not for the feint of heart since this code has not be throughly tested and there are likely bugs. I would not run it in production. So, caveat emptor and all that.

First, there are several dependencies to get out of the way. ZFS on Linux requires libz, uuid, and the Linux kernel headers. These dependencies can be taken care of with a simple aptitude installation. The following command will do the trick.