Migrating ZFS to differently OS

I 'm tired of FreeNAS and feel trapped. Was wondering if I can load a different OS and rebuild existing ZFS Pool or would I have to start from scratch?

Data is already backed up and the only thing in the pool is 6 HDD. So not a total loss if I need to start over.

This is the purpose of zpool import poolname

To be completely pedantic, you are supposed to ā€œexportā€ first (from freeNAS in this case) to ensure the pool completely safe for migration.
https://docs.oracle.com/cd/E19253-01/819-5461/gbchy/index.html

OpenZFS compatibility information is stored in feature flags. Any system with a ZFS implementation which supports all feature flags ā€œactiveā€ on the pool can import the pool read/write. In some other cases you may be able to import the pool read-only.

2 Likes

As @carnogaunt mentioned, ZFS on BSD and ZFS on Solaris, Linux, etcā€¦ arenā€™t entirely feature compatible. You should compare the feature matrices and see which ones youā€™re using. If all features youā€™re using are supported by your target OS, you should be fine to just zpool import.

Just do a 'zpool export ā€™ on your NAS and a ā€˜zpool importā€™ on the new one. I migrated my pool from FreeBSD to LINUX without a hassle. OpenZFS on FreeBSD/FreeNAS and e.g. Ubuntu are pretty similar. As @cekim said, this is the whole point of using ZFS :slight_smile:

As @SgtAwesomesauce said, feature flags are invaluable, and I find ZFS on Ubuntu often lags a bit from FreeBSD/ Freenas.
If the flags match, a simple export/import will work.
If they donā€™t, you can transfer the data using send and receive, which may (or may not) be quicker on a local system than a copy/paste.
Depending on where the data would be in the mean time.

1 Like

Just got done with importing two pools from ubuntu 17.10 to latest freenas. Just as info.

OK fellas, seems like a got a bit of homework. Honestly, I set this up from watching a few vids. A few months later I felt trapped. Thanks for the help.

Nice, glad it just worked for you.
Last time I changed from freenas to Ubuntu, it lacked some feature flags, and Wouldnā€™t import read+write, so had to jockey drives around in my systems to hold the data and re write my pool

Can you elaborate on trapped? Iā€™ve played with freeNAS periodically over the years, but Iā€™ve always had "reasons"TM not to use it that had little to with freeNAS and everything to do with whatever else the storage box was doing or strange ways it was doing it.

Iā€™d be curious to hear what problems or traps you found?

Maybe trapped was a bit harsh. Iā€™ve had no issue using it as just a directory. Guess I just want to explore other options. I just wanted to know if it was possible to keep my pool intact. Iā€™ve got some time before I turn it up.

Itā€™s been off for a few months now since Iā€™ve moved and had to cable my apartment.