How to create ZFS for easy drive swapping between computers?

gigatexal

I'm here to learn
Nov 25, 2012
2,801
543
113
Portland, Oregon
alexandarnarayan.com
I just picked up two HDDs for a ZFS mirror that I will pass through via Hyper-V to a VM for the time being until I decide (if/when) to build a dedicated box. In that vein it would be nice to create the ZFS pool such that I can just do a pool export and then take the drives and put them in this hypothetical other machine and import the pool, how best to do that? is it even feasible? I figure I just create the pool with the drives' uuid?
 

TRACKER

Member
Jan 14, 2019
71
18
8
Hi gigatexal,

just export and import is sufficient.
Of course during import you need to use OS, which can recognize ZFS version used (e.g. solaris 11 zfs (after some version) is not compatible with freenas zfs and with ZoL).
 
  • Like
Reactions: gigatexal

Wolvez

New Member
Apr 24, 2020
18
4
3
If you want to have your pool be compatible with all OSs use:
Code:
zpool create -o version=28
when you create your pool. You won't have any of the new features like encryption if you do that though.
 
  • Like
Reactions: gigatexal