ZFS Convert a ZFS pool from FreeBSD to ZoL - same host

Hi all,

For reasons too long to explain here, I was wondering whether anybody has ever had to try to import an ZFS pool running on FreeBSD to ZFS on Linux (ZoL).

At this precise point in time, it seems the pool version are the same for each implementation at 5000.
I have found the following page on OpenZFS listing some differences in the features available on FreeBSD vs ZoL see here.

To make this very clear, here is the scenario:

- system currently running FreeBSD 10.1 on ZFS root with another larger zpool - let's called that largeDATA - would need to be converted to Ubuntu + ZoL. No need to keep the ZFS root as I can easily install Ubuntu and my applications however I would need to import largeDATA.

I simply do not see how this would be feasible given the fact that all the HDD in the zpool have been configured with GPT for a type of 'freebsd-zfs'.
I then highly doubt it would ever work.

Any thought?
 
FreeBSD and Linux both support GPT, and the 'partition type' chosen when you create a partition is largely irrelevant. I wouldn't expect ZFS-on-Linux to have any problem finding the partitions and seeing ZFS labels.

The issue you may have is whether any new ZFS v5000 'features' have been activated on FreeBSD which are not supported on Linux. The whole thing is a bit of a mess at the moment in my opinion. These new feature flags have been created and ZFS seems to eagerly try and enable as many as possible when you create a pool, rather than letting you switch them on if you want them (unless you have the foresight to manually disable them all when creating the pool). If a feature is enabled on FreeBSD that Linux doesn't support, and it's set as required-for-read (i.e. the pool can't be read without it), Linux won't import it. If the feature is required-for-write, you can import the pool, but only read-only.

Edit: For extra information, the following website has a good overview of the various features supported in each OS and OS version, as well as how to create a pool that works fully across all of them.
http://blog.vx.sk/archives/44-OpenZFS-Feature-Flags-Compatibility-Matrix.html
Code:
zpool create -d -o feature@async_destroy=enabled -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled [device(s)]
 
Thanks a lot usdmatt. Unfortunately I upgraded my pool as I am running FreeBSD 10.1 so I have all these features. Would you know if the features can be disabled on an existing pool?
 
I'm not 100% certain as I have little experience moving zpools around, but I don't think so. Entries like the following in the features man page are slightly worrying:

hole_birth
READ-ONLY COMPATIBLE: no

This feature becomes active as soon as it is enabled and will
never return to being enabled.

Have a look through zpool get all poolname and see if any features are active that are not supported by ZFS-on-Linux.

It's a shame really. Having multi OS support, but being a minefield to move pools around is a fairly big problem and catches out a lot of people who rightly expect ZFS to be ZFS. We went through this all already when the version worked towards v28. If you created a pool on an OS at v19, and wanted to use it on an OS with v12, you had to make sure you created the pool with the right version otherwise moving it was impossible (until the other OS got to v19). It all levelled out when ZFS went closed source at v28, as every OS with ZFS support caught up with each other.

I have nothing really against the idea behind feature flags, allowing different companies to work on ZFS features at the same time, I just wonder if it could of been done a better way. Maybe more work should of been put into making OpenZFS a single cross-platform base with OS specific code split out as much as possible first (work which I believe is one of the goals of OpenZFS). Then all the OS's would use the same core code, or at least have an easier job keeping up with and importing changes.

OpenZFS needs to get to the point where it's more like an application, where the same version can be installed on any OS and you get the exact same functionality, just like you would if you installed Apache 2.x.y on Linux or FreeBSD, or any other supported OS. Of course OpenZFS is mainly made up of companies using OpenZFS for products. I wonder how much priority these companies put on making the base more cross-platform, compared with adding features/improving performance/making changes that primarily improve ZFS for their product (changes which are still good for OpenZFS, but provide no improvement towards making it more consistent across operating systems)
 
Really appreciate the guidance here. I did not expect a smooth ride but since I have backup and an extra disk to boot from Ubuntu, I will see how far I go but I am ready to get a full backup over the network....

Thanks again for your comments !
 
As expected, it is a FAIL! :-(
Running Ubuntu 14.04.2 LTS, I got ZFS:

Code:
dmesg | egrep "SPL|ZFS"
[ 2911.056963] SPL: Loaded module v0.6.3-3~trusty
[ 2911.086218] ZFS: Loaded module v0.6.3-5~trusty, ZFS pool version 5000, ZFS filesystem version 5

I did not export the pool so it complained:
Code:
zpool import zstuff
cannot import 'zstuff': pool may be in use from other system, it was last accessed by oz.homelan.com (hostid: 0x7a0b6d45) on Mon Mar 16 09:26:56 2015
use '-f' to import anyway

but it failed due to the features available on FreeBSD 10+ only.

Code:
zpool import -f zstuff
This pool uses the following feature(s) not supported by this system:
    com.delphix:hole_birth
    com.delphix:embedded_data
cannot import 'zstuff': unsupported version or feature
 
Back
Top