如何将iocage及其所有监狱从一个ZFS池移动到另一个ZFS池?
我从这篇文章中尝试了这个过程:https://www.ixsystems.com/community/threads/how-to-move-jails-between-pools.72593/post-502840
也就是说,iocage export每个监狱,激活新的池,然后iocage import。但这并不成功:
$ iocage start syncthing
No default gateway found for ipv6.
* Starting syncthing
+ Started OK
+ Using devfs_ruleset: 6
+ Configuring VNET FAILED
jexec: execvp: ifconfig: No such file or directory
jexec: execvp: ifconfig: No such file or directory
Stopped syncthing due to VNET failureFreeNAS 11.3
发布于 2020-05-17 22:19:49
要将iocage从/mnt/OLD/iocage移动到/mnt/NEW/iocage:
iocage stop JAILNAME
iocage export JAILNAME这创造了一个日期的.zip在/mnt/OLD/iocage/images的监狱。
使用FreeNAS jails或iocage activate /mnt/NEW激活新池上的iocage。确保新的激活有您的监狱使用的iocage释放(S)。使用iocage fetch安装它们。查看每个监狱的fstab,看看它期望哪个版本。
将导出的监狱.zips复制到iocage将查找它们的位置:
cp /mnt/OLD/iocage/images/* /mnt/NEW/iocage/images进口:
iocage import JAILNAME注意这是监狱的名字,而不是拉链的文件名。
监狱中的任何安装点,特别是iocage提供的安装点,都将指向/mnt/OLD,并导致监狱不从问题中的VNET错误开始。这些必须手动修复。
编辑/mnt/NEW/iocage/jails/JAILNAME/fstab并酌情用/mnt/NEW替换/mnt/OLD的实例。对于简单的监狱,vi中的:%s/OLD/NEW/g将起作用。
例如,Syncthing插件创建的fstab的前三行如下所示:
/mnt/OLD/iocage/releases/11.3-RELEASE/root/bin /mnt/OLD/iocage/jails/syncthing/root/bin nullfs ro 0 0 # Added by iocage on 2020-04-17 00:16:34
/mnt/OLD/iocage/releases/11.3-RELEASE/root/boot /mnt/OLD/iocage/jails/syncthing/root/boot nullfs ro 0 0 # Added by iocage on 2020-04-17 00:16:35
/mnt/OLD/iocage/releases/11.3-RELEASE/root/lib /mnt/OLD/iocage/jails/syncthing/root/lib nullfs ro 0 0 # Added by iocage on 2020-04-17 00:16:35每个/mnt/OLD都需要用/mnt/NEW替换。
iocage start JAILNAMEhttps://serverfault.com/questions/1017540
复制相似问题