Migrating Jails / ZFS Send - not working as expected.

kazjim

Cadet
Joined
Mar 10, 2019
Messages
8
G'day all, I've followed several threads on here around moving my jails to a new pool.
Long story short, i think they are all a little 'old' and out of date.

I'm on FreeNAS-11.2-U2.1 and it is a fresh build.

I think the path to the jails has changed in a recent version, here is a guide I followed

  • zfs snapshot -r NAS/jails@relocate
  • zfs send -R NAS/jails@relocate | zfs receive -v -f Jails
  • zfs get -rH -o name -s received mountpoint Jails | xargs -I {} sh -c "zfs set mountpoint=/{} {}; zfs mount {};"
I believe the paths should now include the iocage directory as well, yes?

e.g.
  • zfs snapshot -r NAS/iocage/jails@relocate
  • zfs send -R NAS/iocage/jails@relocate | zfs receive -v -f Jails/iocage
  • zfs get -rH -o name -s received mountpoint Jails/iocage | xargs -I {} sh -c "zfs set mountpoint=/{} {}; zfs mount {};"
Does this seem right to all?

Or should I just replace jails with iocage??

Cheers
 

kazjim

Cadet
Joined
Mar 10, 2019
Messages
8
Sort of ....

Long story short, yes, you need to use the IOCAGE path, however after they are migrated, you cannot edit the mount points - the script above doesn't really seem to work

I ended up editing the FSTAB for each of the jails with mount points and doing a ^/ and replacing the path name with the new path.

All seemed to work after that..

Except one jail, that I can no longer 'edit' to enable auto-start ..... meh, I can just rebuild that one :)
 
Top