I want to move my iocage Jails from a HDD pool to a new SSD pool.
I came across various instructions on iXsystems forums, one using a snapshot moved over to the new pool and doing some text replacements like this:
stop all plugins/jails
zfs snapshot -r main_pool/jails@relocate
zfs send -R main_pool/jails@relocate | zfs receive -v ssd_pool/jails
zfs get -rH -o name -s received mountpoint ssd_pool/jails | xargs -I {} sh -c “zfs set mountpoint=/{} {}; zfs mount {};”
change the jails pool from the UI
Tried it but didn’t seem to work (replaced jails with iocage since that was the “root” of the folder), can’t tell what I’m doing wrong since I am not an experienced user.
Is there another way to do it? Is there something missing from this procedure?
I wouldn’t want to mess up my entire config, it took me too long to get it to a good point.
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.
Hope it helps someone and if anyone has any idea why the iocage/download mountpoint failed to “migrate”, please let me know.