Move disks between two Freenas system

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
Firstly, thanks to all that contribute on this Forum -its superhelpful.

As per my signature, I have 2 Freenas systems.
System 2 was where I started.
System 1 is what I have just put together.
I want to use disks (with their data) from System 2 (2 disk Mirror) and use them in System 1 (as the only disks in the system). The system 2 disk at this point is simply a small test drive.

Given both are Freenas, is there a simple way to 'swap' the physical drives and have the System 1 disks operate on the System 2 setup.
Thanks in advance
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Given both are Freenas, is there a simple way to 'swap' the physical drives and have the System 1 disks operate on the System 2 setup.
That will be fine.

Depending on exactly what you plan to do (move the OS/boot drive over or not), you may need to first export the pool on system 1 and then import it on system 2 (if you will leave the OS/boot drive in system 1).

If you move both OS and data drives across, no need to do anything else.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
That will be fine.

Depending on exactly what you plan to do (move the OS/boot drive over or not), you may need to first export the pool on system 1 system 2 and then import it on system 2 system 1 (if you will leave the OS/boot drive in system 1 system 2).

If you move both OS and data drives across, no need to do anything else.
Corrected that for you. The original poster had wanted 2->1.

Note that while you can move your old boot drive from system 2 to system 1, the network configuration may not come up properly. Not a real problem. Just get on the console and fix it.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
Corrected that for you. The original poster had wanted 2->1.

Note that while you can move your old boot drive from system 2 to system 1, the network configuration may not come up properly. Not a real problem. Just get on the console and fix it.
Thanks both.
I won’t be moving the boot drive over.
Another question - will jails on system 2 be preserved and recognised on the system as part of the export/import?
Many thanks in advance
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
will jails on system 2 be preserved and recognised on the system as part of the export/import?
If you want that to be the case (and you're not restoring config on the target system either), you should export all the jails first before you export the pool. (the export of the jails is still under the iocage structure and doesn't need to be copied)

iocage export <jailname>

(then export the pool, preserving the content)

Then you can move the pool disks over and import it on the target side.

You may also need to move that dataset aside when you define the iocage pool to avoid it being overwritten with an empty jails root structure. (I haven't had the time this morning to confirm that, but you may be able to skip this part... if you have a backup, you could try)

zfs rename tank/iocage tank/tempiocage

Then

iocage activate tank

then

zfs destroy -r tank/iocage

then

zfs rename tank/tempiocage tank/iocage

Then import your jails
iocage import <jailname>
 
Top