Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

migrating jails from TrueNAS Core to SCALE

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE

blacksteel75

Dabbler
Joined
Feb 26, 2019
Messages
14
Hi all,

I understand that SCALE doesn't support migrating CORE jails during the upgrade process, as it's a Linux OS.

I'm wondering if anyone has tried moving their CORE jails by creating a FreeBSD 12 VM running on SCALE, exporting their jails via:

Code:
iocage export jailname


then importing the jail images into that FreeBSD VM, or something like that?

That might allow gradual migration of jails instead of having to rebuild them all at one.
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,173
You can do that. Might be more effort than it's worth though unless you have a TON of jails
 

sretalla

Hall of Famer
Joined
Jan 1, 2016
Messages
6,922
I think the more useful migration process (possibly requiring some help from iX or the folks at TrueCharts) would be to take the jail data across to the right location for the corresponding App in SCALE and maybe even things like IP/MAC addresses so that starting up the App should take over from where the jail stops.
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
568
I think the more useful migration process (possibly requiring some help from iX or the folks at TrueCharts) would be to take the jail data across to the right location for the corresponding App in SCALE and maybe even things like IP/MAC addresses so that starting up the App should take over from where the jail stops.
Generally speaking: Yes it is possible for a lot of the Apps to migrate data over. But it's a bit hit-or-miss at times:
- For MariaDB plugins: Any plugin that uses mariadb cannot be migrated to TrueCharts by just moving files at all.
- For Other Plugins: Any other plugin one should be able to get the data files out and manually migrate those as long as the application inside supports it
- For custom jails: It depends on your jail setup.

But in general: It will either not be automated ever or not automatable.
 

blacksteel75

Dabbler
Joined
Feb 26, 2019
Messages
14
You can do that. Might be more effort than it's worth though unless you have a TON of jails

In my case, I do have several jails, but they are highly customized and it would require several hours to rebuild each on a new OS, so I would have to buy a new server and run it in parallel until I had them all rebuilt. I wouldn't trust any automated migration process.

So, if this were possible, it would save me buying a server just to upgrade. Interested if anyone has done it yet.
 

sretalla

Hall of Famer
Joined
Jan 1, 2016
Messages
6,922
Keeping in mind that SCALE is not set to "replace" CORE, why would you move at all? you could run a VM with Docker on CORE just the same without the need to move your jails.
 

blacksteel75

Dabbler
Joined
Feb 26, 2019
Messages
14
Keeping in mind that SCALE is not set to "replace" CORE, why would you move at all? you could run a VM with Docker on CORE just the same without the need to move your jails.

Considered that, but much of what I'm doing would run better on a Linux OS with fewer exceptions and unsupported cases. The performance hit to run those in VMs on a FreeBSD host would be painful. I've already experimented. The future projects I'm expecting are also Linux-native, so it's mostly a question of how and when for me.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
5,004
The performance hit to run those in VMs on a FreeBSD host would be painful.
We run dozens of Linux and Windows bhyve VMs without any noticeable performance impact, comparable to e.g. ESXi - what precisely are you trying to do?
 

blacksteel75

Dabbler
Joined
Feb 26, 2019
Messages
14
Thanks Patrick, I should have clarified better. I'm on a relatively modest server, and I believe running only containers/jails for all services is less of a resource strain than a combination of containers/jails and VMs for the same things.
 

Jakob Tewes

Cadet
Joined
Oct 8, 2016
Messages
5
Heyhey @blacksteel75,

feels, like I´m running into the same issues as you. In fact i got a long history with bsd and put nearly all my used services in jails.
As things change over time, I had to adopt docker containsers and thatfor created an ubuntu bhyve vm (running poorly on my weaker-of-two home server).

Now I´m thinking of your approach of exporting&importing jails in the first place or alternatively:
- Creating a TrueNAS Core backup
- Upgrade to TrueNAS Scale
- Create a vm in scale and install TrueNAS Core within that
- Importing backup in the vm and mangle around the configuration (ip, paths, no-longer-needed truenas functions)

But frist question - are you on Scale already and how did you commence?

I personally installed Scale on a separate system and tried experimenting with it. The k3s thing and traffic-with-truechards aswell as their announcement https://truecharts.org/blog/Docker-Compose%20on%20TrueNAS%20SCALE%20using%20TrueCharts kinda leaves me hopeful :smile:

Kind regards

Jakob
 

blacksteel75

Dabbler
Joined
Feb 26, 2019
Messages
14
Heyhey @blacksteel75,

feels, like I´m running into the same issues as you. In fact i got a long history with bsd and put nearly all my used services in jails.
As things change over time, I had to adopt docker containsers and thatfor created an ubuntu bhyve vm (running poorly on my weaker-of-two home server).

Now I´m thinking of your approach of exporting&importing jails in the first place or alternatively:
- Creating a TrueNAS Core backup
- Upgrade to TrueNAS Scale
- Create a vm in scale and install TrueNAS Core within that
- Importing backup in the vm and mangle around the configuration (ip, paths, no-longer-needed truenas functions)

But frist question - are you on Scale already and how did you commence?

I personally installed Scale on a separate system and tried experimenting with it. The k3s thing and traffic-with-truechards aswell as their announcement https://truecharts.org/blog/Docker-Compose%20on%20TrueNAS%20SCALE%20using%20TrueCharts kinda leaves me hopeful :smile:

Kind regards

Jakob

Hi @Jakob Tewes,

I've completed my migration from Core to Scale now, including shutting down all of the Core jails I had running, and I'm no longer running Core. It took several months because of the steps I took to rebuild everything, 2x, essentially. Plus, I wasn't in a hurry.

In the end, I did not use the VM approach that I originally asked about, as it seemed too tricky to get the jail configs right on the new server. Instead, I rebuilt all jails as docker containers, then used TrueCharts applications if they existed. (This was a great way to learn docker, btw)

My general steps were:
- Buy a new temporary server running Debian, install docker on it.
- One-by-one, rebuild all of my jails as docker containers, and migrate them to the temporary server. Shut them down on Core when I'm sure they're working.
- When all jails were migrated and none were running on my Core server, I ran the Core -> Scale upgrade. Fixed various config problems.
- Then one-by-one, install TrueCharts apps for the docker containers.

That said, I still have two apps running as docker stacks on my temporary Debian server, that I have not been able to migrate to Scale because there are no TrueCharts (or standard TrueNAS) apps for them yet. My plan is to just wait until they are released by the TrueCharts team before moving them from my temporary server.

If I wanted to accelerate the process, I could use the TrueCharts "docker-compose" app, and attempt to move the apps that way, by resetting up the containers, etc. But, I'd rather have a supported version in a Scale app because of the complexities in the k8s/k3s configs.

Good luck!
 
Top