Blog
Four ways to get a ZFS filesystem

Copyright © TechPad.co.uk
ZFS is a great filesystem, but it's not easy to get it in every OS. So what are your options?
I've been dabbling with ZFS for a while on OpenSolaris and it's an outstanding filesystem. You can create storage pools, expand them by adding extra drives and you can be protected from drive failure using RAID-like features.
It also does automatic snapshots, is incredibly scalable and you can compress data on the fly. OpenSolaris also includes an application very similar to OS X's Time Machine which uses the ZFS snapshots to create a versioning system, so you can view and restore old copies of files and directories.
In short, it's probably one of the finest filesystems around at the moment.
Although this all sounds quite complicated, ZFS also has a really easy to use interface, so all of this stuff is actually very straightforward to do.
There's one snag. It's not readily available on my platform of choice - Linux.
Unfortunately, ZFS is licensed under Sun's CCDL which isn't compatible with the GPL license used on Linux. This means it can't be incorporated into distributions.
So, if you want to use ZFS what are your options at the moment?
Option 1: ZFS on Linux with FUSE
FUSE is a kernel module for Linux, FreeBSD and other Unix-like operating systems which allows you to run filesystems in userspace (or userland).
Historically it's been widely used to provide support for Windows disks formatted in NTFS format. However, more recently, developers have ported ZFS to FUSE allowing Linux and BSD users to get the benefits of ZFS.
Installing it is as simple as entering sudo apt-get install zfs-fuse and then configuring your storage pool in the usual way, only with /dev/sda1 instead of the Solaris way of defining drives.
The snag? Well, it's not very quick and it uses some of your CPU juice for the checksumming, it's not integrated into the kernel itself, it's in beta (which potentially means it may not be safe for your data) and development seems to have slowed down a little. But it does work.
Option 2: ZFS on Nexenta
It's not Linux, but Nexenta gives you ZFS in a very Linux-like environment.
The Nexenta OS is based on Ubuntu but uses the kernel from OpenSolaris and includes ZFS by default.
This gives you a desktop and application base comparable to Ubuntu with all the neat stuff provided by Solaris and ZFS. My initial tests with Nexenta haven't been too great, as it didn't like the hardware I was using, so fell at the first hurdle. I'd like to have another play around with it on an alternative machine.
Option 3: FreeBSD
Again, it's not Linux, but FreeBSD has managed to get around the licensing issues and has bundled ZFS with the latest version of its OS. You could get a very solid workstation, with Linux binary compatibility and much more software available than on the OpenSolaris platform by going for this option.
However, FreeBSD is a little less user-friendly than OpenSolaris, so this option is not for beginners.
Option 4: OpenSolaris
ZFS is the default filesystem on OpenSolaris, just as it is on Solaris, and it comes with the awesome Time Slider application. If you want to dabble, and you're not a Solaris uber-nerd, OpenSolaris is your best option.
However, as a desktop OS, it's currently a little bit held back by a lack of free codecs for some multimedia formats and its community is much smaller than those of Linux and FreeBSD, so problem solving can be a little more challenging.
It is, though, a really solid system and for many uses it's easily comparable to Linux in terms of general productivity.
Published: TechPad.co.uk Friday 23 October 2009, 7:17 pm
Views: 17,362 times
Filed under: ZFS Linux Solaris
Login to leave your comments
Please login









Recent comments
iplayer-dl is a Ruby application, which will run most easily on Linux or Mac (hence the Mac scree...
TechPad: 18:18 PM Aug 22nd, 2010
I don't understand how to use this. I have vista and firefox. Do I need to copy the iplayer int...
mufc1977: 15:15 PM Aug 21st, 2010
No worries, glad you got the buttons back in their rightful place!
TechPad: 13:13 PM Aug 12th, 2010
Disregard my previous comment: The FIRST time I tried it, it definitely didn't work. After addi...
freshrich: 1:01 AM Aug 10th, 2010
Great tutorial, but it doesn't work with Ubuntu Lucid. The only way I could get it to work was b...
freshrich: 1:01 AM Aug 10th, 2010