Why ZFS
You probably are not reading this to discover what ZFS is (short story: its a file system), so I'll skip that. You probably also understand the benefits, but I'll summarize them anyway, briefly:
- Currently not available (arguably) in any mainstream modern filesystem:
- End-to-end data integrity, through on-disk checksumming and automatic healing (if redundancy exists).
- With exponentially growing disk capacities, "silent corruption" is approaching a mathematical certainty with current filesystems.
- End-to-end data integrity is becoming a baseline requirement for any data you wish to remain valid over time, yet few filesystems currently address.
- Helps prevent or eliminate "bit rot" (a form of silent corruption).
- Helps prevent or eliminate data corruption by any hardware component in the chain.
- Currently still somewhat rare in modern filesystems:
- Copy-On-Write transactional model (for more reliable on-disk writes and provides foundation for other advanced features).
- Double-parity RAID-Z2 (like RAID-6) and triple-parity RAID-Z3, to combat the growing near-mathematical likelihood of a second drive failing while resilvering from a first failed drive in RAID-5 configurations.
- Elimination of the RAID-5 power-failure "Write Hole" for striped parity pools.
- Software RAID implimentation (essentially required for end-to-end data integrity) with performance rivaling or exceeding modern hardware RAID hardware.
- Can have redundancy for automatic bitrot healing even without mirrors or RAID-Zx, with the "copies" property.
- Fine-grained snapshot capability.
- Can stream snapshots to any format, medium, and/or destination.
- Read/write snapshot clones.
- All-in-one block device, array, and pool management - with only two basic commands. (The classic storage stack is flattened with redundancy between layers removed.)
- Pools can be safely grown by replacing disks in an array with larger models, and/or by adding arrays new arrays.
- Currently neither arrays nor pools can be shrunk (usually not a concern in most use cases).
- Advanced two-stage, SSD-aware read-caching model.
- Transparent in-line block-level pool-wide deduplication.
- Transparent in-line compression.
- Transparent in-line encryption.
Which ZFS
For those requiring open-source solutions (whether on principle, cost, or both), there used to be only one real answer to this question: OpenSolaris. Sun Microsystems made history when they open-sourced Solaris. While alternatives to ZFS on [Open]Solaris started springing up, OpenSolaris (where ZFS was born) was still the de-facto (and arguably best) way to get ZFS.
That story began to change when it seemed increasingly likely that Oracle would purchase Sun Microsystems, and [Open]Solaris along with it. The fear (not completely unfounded) was that Oracle would kill the "Open" in OpenSolaris, in spite of the fact that Sun's own CDDL license would make that difficult. The fruits of that purchase have been revealed: OpenSolaris has become Oracle Solaris Express 11. It both confirms and refutes the fears. Without going into the details of how and when Oracle plans to release the CDDL code to the community, suffice to say it is less than ideal, and not very "open" at all. (In addition, it seems commonly expected that entirely proprietary code will start to replace existing CDDL'ed code).
Integrating ZFS into an operating system is not just a technical challenge, it can also be a legal one. The original engineers of ZFS themselves at Sun allegedly wanted a license model that was explicitly incompatible with the common GPL license of the Linux kernel. Sun created the "CDDL" open-source license, based on the Mozilla license, which was already well-known to be incompatible with GPL.
However, that does not mean it is impossible to include ZFS in a non-Solaris kernel. For starters, the BSD license is not incompatible with CDDL. Furthermore, the incompatibility with GPL only applies to code included in the kernel. But it can be run in user-space (e.g. FUSE), or could be installed as a Loadable Kernel Module not distributed with the kernel itself.
Availability of ZFS and ZFS-like advanced file systems, as of 2011-02-09
| Stable? | Platform | based on | ZFS ver | ZPool ver | Pros | Cons | Notes |
|---|---|---|---|---|---|---|---|
| Y | Oracle Solaris 11 Express 2010.11 | ON 151a | 31 |
- Currently has the most recent implementation of ZFS. - Arguably the easiest of the bunch (of those offering ZFS in the kernel) to install and administer. - GUI (Gnome) is more polished and useful than FreeBSD+Gnome, NexentaCP+Gnome, and OpenSolaris. - Free (as in beer). |
- License limited to use by developers/testers (other home uses probably wouldn't be thrown in jail). - Not free (as in speech). - Limited driver support. - GUI not as polished as most Linux distros. - Administrative commands very different than BSD or Linux. - Primitive package manager. - Limited package repository. |
- The existence of Oracle as the new owner of Solaris, and the licensing model (not necessarily on paper but recently announced in practice) are antithetical to lovers of the fully free/libre BSD model. | |
| Y | Nexenta Core Platform v3.0.1 | ON 134b | 26 |
- Solid text-mode installer can easily install root to a ZFS mirror. - The Nexenta community ported the Debian apt-get package manager, and have several available ported/recompiled binary packages are available through it (that will run on the Solaris kernel). - Third party utilities are available to provide web interface to ZFS and other Solaris administrative tools. |
- Has absolutely nothing to do with Ubuntu, in spite of product positioning. - Gnome can be installed, but the result is very primitive and arguably not worth the effort, unless you have administrative utilities (compiled for Solaris) requiring GTK+/Gnome. - Has a limited handful of GNU commands ported and recompiled to work on Solaris, which just winds up confusing Solaris users/admins. (GNU binaries can fortunately be disabled for less confusion.) |
- In spite of some community confusion, linux binaries (from Ubuntu or not) will not run.
- See this post for a detailed clarification of the common Nexenta/Ubuntu confusion.
- GUI-less installation by default. - Plans to move base from ON 134b, to Illumos in future. (Which will make it less reliant on Oracle, arguably less risky, and arguably more likely to truly fork in the future from Oracle Solaris.) |
|
| Y | FreeBSD v8.1 | (BSD) | 14 |
- OS virtually free of almost all "big brother interference".
- Solid implementation of ZFS (and although currenty as old as OpenSolaris 2009.06, at least is under ongoing development). |
- Absolutely ancient installer. - Manual tinkering required for bootable root on ZFS (single or mirrored). - No deduplication with supplied ZFS version. |
- Very much an "old-school" POSIX OS. - GUI-less installation by default. - Able to acheive very small installation footprint. - Manual tinkering of config files, init scripts, and daemons required for most configuration/administration. |
|
| Y | Sun OpenSolaris 2009.06 | ON 111b | 14 |
- Arguably "The Last Free Solaris". - Solid installer. - GUI (Gnome) more polished than FreeBSD+Gnome or NexentaCP+Gnome. |
- No longer maintained. - Limited driver support. - GUI not as polished as most Linux distros. - Administrative commands very different than BSD or Linux. - Primitive package manager. - Converting root pool to a mirror requires manual tinkering. - Limited package repository. - Cryptic package names. - No deduplication with this version. |
- If you are satisfied with ZPool v14 (same as latest stable FreeBSD v8.1), then it's hard to go wrong with this. - Extended ACL model is completely broken and unusable for production (classic model is fine). - Because ZFS kernel-level CIFS/SMB service relies on broken ACL model, you must use add-on Samba server (which is solid) instead, for Windows share server. |
|
| Y | ZFS-FUSE for Linux, Mac OS X, and BSD | FUSE cross-platform user-space filesystem API | 23 |
- Solid by now (in spite of getting off to a rough start and in spite of FUSE modules [being very easy for newbies to write] having something of a reputation for immaturity). - Perhaps inarguably the easiest to install and go (including installing a modern, user-friendly Linux distro). - Able to acheive very small installation footprint with choice of a minimalist Linux distro. |
- Currently does not perform as well as in-kernel variants (but in theory it could reach parity with refinement). |
- Some purists object to the notion of a filesystem in userspace. But in actual use there is little administrative difference, nor must there necessarily be a performance impact. |
|
| y | KQ Infotech ZFS Linux Loadable Kernel Module | (Linux) | 28 | - Linux Loadable kernel module should in theory outperform ZFS-FUSE for Linux. - Claims to be "GA-quality". | - Appears to be targeted as an enterprise product with paid support. License terms are not clear on their website, but would have to also be CDDL (free and open-source). | ||
| n | Btrfs | (Linux) | n/a | n/a |
- All or most of the major benefits of ZFS (particularly COW, pooling, end-to-end checksumming, integrated management, writable snapshots) - Pools can be grown and shrunk (ZFS can only grow). - GPL license compatible with Linux kernel (vs GPL-incompatible CDDL license of ZFS). - Already included in Linux kernel (for testing only). |
- No plans for in-line encryption on roadmap. |
- Sponsored by Oracle (may be seen as a "con" by some). - Completely different implementation approach to features that ZFS. - Current build does not include deduplication, but it is planned. |
| n | Illumos | ON 147 | 22 | - The Illumos project aims to replace closed-source drivers, encryption code, and other binaries with open-source code; while otherwise maintaining binary compatibility with ongoing Oracle Solaris development. This should significantly reduce the risk of another sudden "shutdown" of an open-ish Solaris-based project (as happened with OpenSolaris after Oracle purchased Sun), and provide a much "sunnier" outlook for ZFS (and the ON kernel). - Plans to be the base platform for innumerable future distributions (including OpenIndiana, Nexenta, Schillix, Belinix, etc.). | - Project homepage does not currently show many updates or much recent activity. | ||
| n | Schillix | Illumos | 22 | - A convenient way to get a binary dev build of Illumos, without compiling it yourself. | |||
| N | OpenIndiana | ON 147 | 28 | - Aims to stay true to the OpenSolaris experience. | - Plans to move base from ON 147, to Illumos in future. (Which will make it less reliant on Oracle, arguably less risky, and arguably more likely to truly fork in the future from Oracle Solaris.) | ||
| n | LLNL ZFS Linux Loadable Kernel Module | (Linux) | 28 | - Linux Loadable kernel module should in theory outperform ZFS-FUSE for Linux. | - Little available information currently. | - Lawrence Livermore National Laboratory port of ZFS under contract by the US Department of Energy. Like the KQ Infotech LKM, it is a Linux Loadable Kernel Module distributed separately, thus doesn't violate Sun/Oracle's GPL-incompatible CDDL license. | |
| n | Mac ZFS | (Mac OS X) | 2 | 8 | - Old version of ZFS. | - A Mac OS X (Darwin) Loadable Kernel Module. | |
| ? | Milax | ON 128a | 20 | - Small footprint, low overhead. | - No deduplication in this version of ZFS. | - Targeted as a minimalist installation. | |
| ? | EON ZFS Storage | ON 134 (?) | 26 | - Can install to and boot from thumbdrive. |
- Runs from RAM. - Minimalist installation. |
If you find any factual errors, please leave a comment.