SOLVED Issue migrating plugin Jails to differenet pools "freebsd-version could not be found"

Grinas

Contributor
Joined
May 4, 2017
Messages
174
I am trying to migrate jails from one pool to another.

I have tired to do the method details in this post but after completing many of the jails will not start and they show as corrupted. I get the following error when i try start.

Code:
iocage start couchpotato

freebsd-version could not be found at /mnt/ssd1tb/iocage/jails/couchpotato/root/bin/freebsd-version


Code:
iocage list
freebsd-version could not be found at /mnt/ssd1tb/iocage/jails/couchpotato/root/bin/freebsd-version
+-----+-------------+---------+--------------+-------------+
| JID |    NAME     |  STATE  |   RELEASE    |     IP4     |
+=====+=============+=========+==============+=============+
| -   | couchpotato | CORRUPT | N/A          | N/A         |
+-----+-------------+---------+--------------+-------------+
| -   | jail        | down    | 11.2-RELEASE | 192.168.0.7 |
+-----+-------------+---------+--------------+-------------+


I have backups of all the jails and reactivated the old pool and import the jails and they work as expected. I have also fetched the releases again on the new pool to see if that resolves the issue as the issue appears to be due to the releases but it is still the same. In the web UI i am also unable to select the release to use for the jail.

Code:
ls  /mnt/ssd1tb/iocage/releases/
11.2-RELEASE    11.3-RELEASE


screenshot of the jail after being imported into the previous pool.
BgoKNsF.png


From what I can see it only appears to be jails that were created as plugins that that were not created from plugins appear to be running fine after the move.
Cs54Une.png


I was running 11.2 but upgraded to FreeNAS-11.3-U3.2 as it was detailed in this link that it was the resolution to the issue but it did not resolve the issue.

I have also attempted to import the jails in the new pool after fetching the releases but still get the same results.

Anyone have any ideas on how to resolve or can provide a workaround?
 
Last edited:

Grinas

Contributor
Joined
May 4, 2017
Messages
174
I followed the guide in the link i mentioned again and this time it worked. I guess third time lucky.

I should note you will need to change the mount points from the old pool to the new pool. I did this using sed with the command below.

sed -i -e 's/<OLD-POOL>/<NEW-POOL>/g' /mnt/<NEW-POOL>/iocage/jails/*/fstab

Full Commands
Code:
iocage stop ALL
# optional - back up/export all the jails
iocage export ALL
# optional - back up all the exports to another pool
cp <OLD-POOL>/iocage/images/* <BACK-UP-LOCATION>
# unmounting old jail pool
zfs unmount -f <OLD-POOL>/iocage
# taking snapshot of old jail pool
zfs snapshot -r <OLD-POOL>/iocage@migration
# copying jails to new pool
zfs send -R <OLD-POOL>/iocage@migration | zfs receive -v <NEW-POOL>/iocage
# Destroy specified iocage datasets.
iocage clean -a
# destroying old pool
zfs destroy -rf <OLD-POOL>/iocage
# configuring new pool as Jails storage
iocage activate <NEW-POOL>
# updating jail mount points to the new pool
sed -i -e 's/<OLD-POOL>/<NEW-POOL>/g' /mnt/<NEW-POOL>/iocage/jails/*/fstab
 
Top