Solved Move FreeBSD on ZFS to different machine

Hi,
It may be a silly question but I’m little confused abou this zpool import/export. So I need to move all disks with FreeBSD on ZFS to different machine - different ammount od RAM, different CPU etc. I just want to have FreeBSD with all data on different machine. There are 3 disk mirrors.
I don’t want to destroy anything.
I’ve got to pools:
zroot for system and data for data.
Do I need to do some extra stuff as zpool export on zroot or data?
 
First things first: is that system using a GENERIC kernel or has the kernel been reconfigured? Also: I assume the architecture is the same for both machines? Because if not you're going to have other problems on your hand.

If you hook up the disks in the same order then theoretically you could just move the disks over. A lot depends on the way things have been set up, for example systems which are accessed using labels vs. device names. But you wouldn't need to apply any export or import process.

This is of course assuming we're talking moving the physical disks from one box into the other.
 
The architecture (CPU, endianness, wordsize, instruction set) has to be the same, since the OP is taking the OS itself along with the disks: the include the zroot pool. But even if the architecture were not the same, I think it would make no difference, as I remember learning that ZFS's on-disk data structures are tagged with endianness and will auto-convert (if I remember right, they use "write native, read any").
 
Thanks for your answers!
Both CPUs have the same architecture but I'm not sure about other stuff: wordsize, instruction set etc.
But I've got another question. If I export only data pool by zpool export command and on the second machine I install fresh FreeBSD and then move only disks with data (disks with system will stay on the same machine) I assume that if I call zpool import command the disks order isn't important right? It should do the job regardless disks order.
 
If I export only data pool by zpool export command and on the second machine I install fresh FreeBSD and then move only disks with data (disks with system will stay on the same machine) I assume that if I call zpool import command the disks order isn't important right?
Yes, that should work. Order of the physical disks doesn't matter, ZFS will find the disks in the right order by the metadata that's stored on the disks.
 
Just to be sure. There is no possibility to run 'zpool export zroot' where zroot is zpool with system installed on it. I assuming that because in man zpool I can read that while export procedure all datasets needs to be unmounted.
What's more I've got no idea how import procedure should look like when system is exported -> marked as offline. I'm assuming that after moving it to another machine FreeBSD won't boot.
Am I right?
 
There is no possibility to run 'zpool export zroot' where zroot is zpool with system installed on it.
Not if you booted from that pool. It would be like pulling the rug from underneath the table.
 
Back
Top