Once the spl packages are built and installed you can build the zfs packages using the standard autoconf style build system. The zfs build system is designed to detect and build against your kernel and the spl module. Simply build it as you would any other autoconf style project. The build system will make an educated guess as to which kernel and version of the spl you wish to build against. If it guesses wrong simply specify your kernel devel headers using the --with-linux configure option. You may also need the --with-linux-obj configure option if the kernel build objects are installed in a different directory. You can also specify an alternate version of the spl using the --with-spl and --with-spl-obj

$ sudo apt-get install zlib1g-dev uuid-dev libblkid-dev libselinux-dev parted lsscsi
$ ./configure
$ make deb

The result of this will be two source rpm packages... Yes, source rpm packages. Currently, deb style packages are built by first creating rpm packages and then converting them to deb packages using alien. Long term we would like to directly create deb packages but it has not been a priority. If anyone familiar with Debian style packaging would like to help with this please feel free to contact us.

  • zfs-w.x.y-z.src.rpm: Source for the zfs utilities, libraries, and test infrastructure.
  • zfs-modules-w.x.y-z.src.rpm: Source for the zfs kernel module stack.

And five binary deb packages for your platform.

  • zfs-w.x.y-z_arch.deb: The zfs utilities and libraries.
  • zfs-devel-w.x.y-z_arch.deb: The zfs development headers.
  • zfs-test-w.x.y-z_arch.deb: The zfs regression test scripts and infrastructure.
  • zfs-modules-w.x.y-z_kernel_arch.deb: The zfs kernel module stack for your kernel version.
  • zfs-modules-devel-w.x.y-z_kernel_arch.deb: The zfs development headers and symbols for building dependent kernel modules.

Next go ahead and install the packages.

$ sudo dpkg -i *_amd64.deb

Selecting previously deselected package zfs.
(Reading database ... 225344 files and directories currently installed.)
Unpacking zfs (from zfs_0.5.0-2_amd64.deb) ...
Selecting previously deselected package zfs-devel.
Unpacking zfs-devel (from zfs-devel_0.5.0-2_amd64.deb) ...
Selecting previously deselected package zfs-modules.
Unpacking zfs-modules (from zfs-modules_0.5.0-2_amd64.deb) ...
Selecting previously deselected package zfs-modules-devel.
Unpacking zfs-modules-devel (from zfs-modules-devel_0.5.0-2_amd64.deb) ...
Selecting previously deselected package zfs-test.
Unpacking zfs-test (from zfs-test_0.5.0-2_amd64.deb) ...
Setting up zfs (0.5.0-2) ...
Setting up zfs-devel (0.5.0-2) ...
Setting up zfs-modules (0.5.0-2) ...
Setting up zfs-modules-devel (0.5.0-2) ...
Setting up zfs-test (0.5.0-2) ...
Processing triggers for man-db ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

That’s it! You should be able to use the zfs tools just like you would under Solaris. If your unfamiliar with zfs I would suggest looking over the official documentation or going through one the many tutorials available online . There are also several examples available here.

If you would like to verify the packages you just built you can run the included regression test suites.