I'm planning to build a FreeNAS box sometime soon, but if ZFS on Linux eventually proves to be reliable, I might want to switch, just to have a more familiar OS.
So I'm wondering if I can trust that the different implementations of ZFS are compatible. In other words, if I just swap out the boot disk from FreeNAS to Linux or OpenIndiana, can I trust that nothing bad will happen to my data?
This may seem like a stupid question--obviously it ought to be compatible--but I'm guessing that ZFS isn't commonly used in cases where drives are moved between computers, so I'm hoping someone can provide a better answer than just "it ought to be".
You should pay close attention to the zpool versions. That's the major differentiator between the Oracle, former-OpenSolaris, Linux and *BSD variants of ZFS.
Basically, you can upgrade an older zpool to a newer version, but you cannot downgrade.
Oddly-enough, Wikipedia has the best summary of the different zpool versions and the differences between them.
The current list of zpool versions amongst ZFS implementations is here.
I use NexentaStor 3.1. According to that schedule, I'd be able to work with ZFS filesystems from OpenIndiana and FreeBSD, but NOT Solaris 11, for example.
I do believe FreeNAS is on a super-old version of ZFS, though. Consider Nexenta?
The ZFS support in FreeBSD and OpenIndiana is based on the same OpenSolaris code, so they are certainly compatible within the normal limits (same goes with other OpenSolaris derivatives). There is a Linux module available that allows you to use the OpenSolaris code in Linux (they can't be distributed together, ever, because of Linux's infectious license). This would also be compatible for the same reasons.
There is an effort to build a GPL'd ZFS codebase from scratch. There is no inherent guarantee of compatibility now or at any point in the future. Where they decide to take the project is their own responsibility, though their "goal" is compatibility it's not there yet.
I have also seen plenty of people claim that Linux can include code from other licenses. This is true. The CDDL license, which OpenSolaris is covered by, does not allow it to be included with projects that impose more restrictive terms than it does however. Linux's GPL requires that when people make improvements to the OS that those improvement be contributed back; this "more restrictive" term means that CDDL code can not be included with GPL code. Giving Oracle an excuse to sue you probably isn't a good idea. FreeNAS and the rest of the BSDs use the BSD license, which is less restrictive than the CDDL.
The future of ZFS development outside of Oracle will introduce ZFS Feature Flags. This should make it possible for you to use a newer ZFS system on a storage pool based on an older ZFS version. So the answer is yes, it should be safe to start with FreeNAS today and move to Linux later when ZFS there is more mature.
I know FreeBSD now follows the ZFS changes in Illumos very closely. New bugfixes or features are added to FreeBSD-HEAD in matter of days or weeks. I also believe the zfsonlinux project follows ZFS changes in the Illumos ZFS source. And they most likely will have ZFS Feature Flags, if it's not already added. But they do at the moment have a higher priority reaching the stability and quality level that Illumos and FreeBSD has.
i've moved some large pools as follows:
started on solaris 10 (left due to .edu pricing changes under the oracle regime)
moved to nexenta (it's not as awesome as you're hoping it will be...in particular, even though it has debian'ish userland, all the sysadmin stuff is still solaris/illumos/whatever).
moved to freebsd (it's fine, except that the scsi drivers for my hardware weren't). Here, I added a new pool or two.
moved to openindiana (it was kind of like coming back home)
So, in general, it is definitely possible to move pools across OSes. You can even move from little-endian to big-endian (sparc to x64, or vice versa). The key, however, as the other poster said, the pool version. As long as you are moving TO a system with ZFS code that supports the same, or a newer version, you should be happy. I suppose this may be a reason to avoid upgrading your pool version when you upgrade your OS.