iocage import fails

DarthMuppet

Dabbler
Joined
Jul 30, 2012
Messages
18
Hi all:-

My scenario is that I am moving from a Microserver Gen 7 natively running 11.2U6 to an ESX VM on a Microserver Gen 8. My process went like this:

  1. Build new freenas VM 11.2U6
  2. save config from original server
  3. import config on new server
  4. reboot
  5. Restore the file share content from backups
I'm copying the data manually, as I can saturate the network connection using SMB, whereas scp, rsync, snapshots etc won't even get near half bandwidth. I suspect the old server is the cause of that.

The data igration is going OK currently, 1TB out of 6TB is now done, but for some reason I cannot import either of the jails i have previously exported from the original server. i get the same error for each of them:

Code:
root@nas:/mnt/Data_01 # iocage import plex
Traceback (most recent call last):
  File "/usr/local/bin/iocage", line 10, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/iocage_cli/import.py", line 36, in cli
    ioc.IOCage(jail=jail).import_()
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 121, in __init__
    self.jails = self.list("uuid")
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 1169, in list
    quick=quick
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_list.py", line 64, in list_datasets
    iocage_lib.ioc_json.IOCJson().json_check_default_config()
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_json.py", line 1924, in json_check_default_config
    self.json_write(default_props, default_json_location)
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_json.py", line 431, in json_write
    if template else None
  File "libzfs.pyx", line 645, in libzfs.ZFS.get_dataset_by_path
libzfs.ZFSException: Dataset with path  not found
root@nas:/mnt/Data_01 #


Note that there are two spaces between 'path' and 'not' suggesting that the dataset path itself is not being found from wherever the 'import' command needs to find it. I still have the old server fully operational, so I can re-do anything necessary. There are a few posts of similar messages, none of which seem to be relevant to me (and the fixes don't work). I've also tried using the current version of iocage from github and that has the same issue (exporting and importing with that version too)

I have no idea how to troubleshoot this, but quite happy to take direction from anyone that might be able to help.

TIA

DM
 

DarthMuppet

Dabbler
Joined
Jul 30, 2012
Messages
18
No clue what was going on here, but the original server also broke, with similar messages. I have repaired both by removing the iocage dataset and recreating it. Importing the exported jails was troublesome though, and all to do with paths in each jail's fstab file. it was fine on the original server, but on the new one I had to manually change all of them, as the path to iocage had changed, as well as the path to the internally mounted filesystems. Attempting to start the plex jail with the iocage paths wrong actually corrupted fstab, filling it with huge strings of backslashes amongst other things. That is definitely a bug, but I am not sure I can reproduce it. As soon as I had *all* the paths correct, everything worked.

Things I learned during my migration:
  1. don't delete the iocage dataset without relocating the exported jails (they were already on the new server, so i just copied them back, but they were huge)
  2. check the size of your plex jails before you export. Mine took 30 minutes, and was only 15GB, but i have heard of 180GB exports.
  3. make sure that you put the .zip files back in the iocage/images folder before you try to import them - that's not documented as far as I can see
  4. iocage import and export functions are not included in the official documentation for iocage V1.2
  5. VMWare users need to enable promiscuous mode on the ESX vSwitch as it breaks DHCP for a jail otherwise.
  6. restoring from my backups was quicker than copying from the original server. That was a Gen7 Microserver with an N36L processor
  7. export / import of a jail retains the MAC address of the original jail - no changes to DHCP reservations :)
  8. Gen 8 Microservers run so hot when the disks are active (3TB took about 12 hours) that I can turn off the hall radiator....
 
Top