Readers should note that this applies to Ubuntu 8.10 Intrepid Ibex only!

ZFS is a relatively new filesystem created by Sun. It is released under the CDDL License which is incompatible with Linux’s GPL License, meaning that it can not be installed natively in the kernel. Therefore, for not it is relegated to addon packages and is brought to Ubuntu via the Fuse framework.

For more information on this see the Ubuntu Wiki article on ZFS.

The wiki article also explains this, but getting ZFS installed on Ubuntu is actually pretty straightforward by issuing these commands:

$ sudo echo "deb http://ppa.launchpad.net/brcha/ubuntu intrepid main" >> /etc/apt/sources.list.d/zfs-fuse.list
$ sudo echo "deb-src http://ppa.launchpad.net/brcha/ubuntu intrepid main" >> /etc/apt/sources.list.d/zfs-fuse.list
$ sudo apt-get update
$ sudo apt-get install zfs-fuse

This installs zfs onto your system. Now to create your raid-z array! Its dead simple.

$ sudo zpool create media -m /storage raidz /dev/sda /dev/sdb /dev/sdc

In the above command:

  • media is the name of the pool,
  • /storage is the mount point (make sure it already exists),
  • raidz is the type of mirroring/striping we are going to run (see more below), and
  • the rest of the options are the devices you are adding into the pool.

Make sure the mount directory already exists.

The type of array you are creating can be the following:

  • mirror will mirror the data across disks
  • raidz will mirror and stripe data across all disks, allowing 1 drive to fail without losing data
  • raidz2 will mirror and stripe data across all disks, allowing 2 drives to fail without losing data (but creating more overhead)

That really is it! You’ll then have a raid array, mounted to your indicated mount point. You can do all kinds of cool stuff with your pool, such as add disks, export the array to a file, import an exported file to the disk, create hot spares, and more.

After far as speed goes, I tested the pool performance with bonnie and also via real world estimates, and I’m only receiving about 20Mb/sec. Its not stellar and I plan to do some more testing as I haven’t tweaked my disks at all and I think I may be able to push it further. This slowness is caused by the checksumming that zfs does — it makes your data extremely safe but it does cause a lot of CPU overhead.

Hopefully ZFS will get more and more stable with time (although I haven’t had any problems with it so far!) and will be included in the Linux kernel, because it really is a great performing, easy to use file system. The uses for it could be tremendous, such as creating a desktop system as a zfs pool and creating instant disk backups from it with minimal overhead. Think: Time Machine for Linux!

18 comments
  1. I do not believe so. Fuse-zfs is a addon and not supported in the main kernel, and therefore not available in the main install process.

  2. hey dude, zfs is not going to get included in the GPL linux kernel because of license incompatibilities.

  3. hey dude, zfs is not going to get included in the GPL linux kernel because of license incompatibilities.

  4. Fail fail fail
    You cannot add disk to an already exsisting raidz or raidz2 array.
    Learn about zfs first before you write crap like that.

  5. Fail fail fail
    You cannot add disk to an already exsisting raidz or raidz2 array.
    Learn about zfs first before you write crap like that.

  6. @colbs

    Until block pointer rewrite is done, then Gumle is quite correct.

    You can add disks to simple pool vdevs, you cannot currently add new columns (disks) to RAIDZ vdevs.

    BP rewrite is not a priority at Sun, it should be noted.

  7. @colbs

    Until block pointer rewrite is done, then Gumle is quite correct.

    You can add disks to simple pool vdevs, you cannot currently add new columns (disks) to RAIDZ vdevs.

    BP rewrite is not a priority at Sun, it should be noted.

Comments are closed.

You May Also Like

Firesheep Should Be A Call To Arms For System, Network & Web Admins

Firesheep by Eric Butler has just been released to the world. This Firefox plugin does a few things that have already been fairly easy to do for a while, but rolled up in one easy to use package: Sniffs data on unencrypted Wireless Networks Looks for unencrypted login cookies sent to known popular insecure sites Allows you to login to that account with ‘One Click’ So what sites are impacted by default? Amazon.com, Basecamp, bit.ly, Cisco, CNET, Dropbox, Enom, Evernote, Facebook, Flickr, Github, Google, HackerNews, Harvest, Windows Live, NY Times, Pivotal Tracker, Slicehost, tumblr, Twitter, WordPress, Yahoo, and Yelp are among the few. A plugin system allows anyone to add their own sites (and cookie styles) to the plugin. Yikes! It goes without saying that this is a major security problem for anyone who uses unencrypted wireless networks. Includes on this list are many universities and companies such as Starbucks.

How to Turn PHP into an RPM The Easy Way with FPM

So you have a custom PHP binary that you wish to distribute…

Cpuspeed Reboot Loop on Dual Opteron

I recently had a problem with a dual Opteron system going into…

Evaluating FTP Servers: ProFTPd vs PureFTPd vs vsftpd

Usually, I will try to push clients towards using SCP (via a client such as WinSCP), however inevitably there are clients who do not understand this new method of accessing their files securely online, and who for one reason or another insist on using FTP for their online file access. As they say – the customer is always right?