Move jails to another pool

This resource was originally made by user: mistermanko on the TrueNAS Community Forums Archive. Please DM this account or comment in this thread to claim it.

Made this a resource, as this has helped me a couple of times and is simple enough for inexperienced users to succeed.

I’d like to add a step-by-step guide that help me to do that. I it found over at lawrencesystems.com

I wanted to move jails from bluePool to ssdPool

  • logged out from the UI (don’t know if it played a part, thought to be safe)
  • iocage stop ALL
  • zfs unmount -f bluePool/iocage
  • zfs snapshot -r bluePool/iocage@migration
  • zfs send -R bluePool/iocage@migration | zfs receive -v ssdPool/iocage
  • iocage clean -a
  • zfs destroy -rf bluePool/iocage
  • iocage activate ssdPool
  • zfs destroy -r ssdPool/iocage@migration
  • zfs set mountpoint=none ssdPool/iocage/download
  • zfs set mountpoint=/ssdPool/iocage/download ssdPool/iocage/download

Last couple of commands were needed because when I issued
iocage list
I got
Please set a mountpoint on ssdPool/iocage/download
and I could not set the mountpoint just using the second command, I had to clean it up first (can’t tell if it was “locked” somehow by the previous setup, don’t know that much about FreeBSD).

Then I had to manually edit all the fstab for my jails
iocage fstab -e jail_name
and replace bluePool/iocage with ssdPool/iocage

That’s all. I logged in to the UI, started my jails/plugins and everything worked fine.

2 Likes

Glad this resource made it into the new forums. Happy to claim and maybe update it, some of it could confuse new SCALE users, as this is originally written for CORE only.

Ownership changed! Feel free to edit as needed.