renaming pool with jails/vms

jinlsui

Dabbler
Joined
Mar 28, 2021
Messages
10
I have the same question or problem. After I renamed my pool, my jailed plugin (Plex server) is not able to start, even if I reconfigure the mounting point on the GUI. Obviously, the mounting point was not renamed according to the new pool name. I suspect that there must be several other configuration files related to the mounting point that need to be manually fixed. This is a potential issue for many who plan to either rename their pool or migrate their jails to a different pool with not the same pool name.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Try this:
  1. Shut down your jails.
  2. Export each jail via iocage export <jail name>. This creates a TAR image of the jail suitable for later import in /mnt/<name of your pool>/iocage/images. Copy these TAR files somewhere outside the /mnt/<name of your pool>/iocage path.
  3. Rename your pool.
  4. Verify the renamed pool is designated as the jail pool, by clicking the gear icon in the Jail screen. If not, redesignate your renamed pool as the jail pool.
  5. Your jails should auto-populate. If not, copy your saved TAR files back into /mnt/<new name of your pool>/iocage/images path, and re-import them from the saved export images via iocage import <name of jail>.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
For VMs, you only need to update the path to the zvol for the virtual disk device.
  1. Shut down your VMs.
  2. Rename your pool.
  3. Expand each VM, and click Devices. For each DISK device, click the 3 dots, and update the zvol property to the new pool path, and Save.
 

jinlsui

Dabbler
Joined
Mar 28, 2021
Messages
10
what will happen to the existing jails when importing the same just exported jail/plugin? Will export/import jails resolve this issue even after the pool has already been renamed?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
No, conflicts won't be resolved.

If the jail still exisis after re-import as it most certainly will, there is no need to import. Only if the jail is destroyed by some improbable typo/glitch, will you resort to the exported backup as an emergency measure.
 
Top