Solved jailed FreeBSD-14.2RELEASEp2 - problem with pkg

FreeBSD-14.2p2

I just discovered that one of my jails (pas-redmine-2) has somehow acquired a new working directory. This is clearly an anomaly because I am now having problems connect to it and I cannot get it to upgrade its packages. The correct directory is still present. I am at a loss as to how to proceed.

Code:
# ll /zroot/iocage/jails/
total 16
drwxr-xr-x  3 root wheel 5 Jun  6 07:47 03929fef-5d95-4ebb-a1aa-dbb167f22a03
drwxr-xr-x  3 root wheel 5 Jun  6 07:47 dns03-2
drwxr-xr-x  3 root wheel 5 Jun  6 07:47 imap-119
drwxr-xr-x  3 root wheel 5 Jun  6 07:48 mx32-2
drwxr-xr-x  3 root wheel 5 May  2 11:24 pas-redmine-2
drwxr-xr-x  3 root wheel 6 Jun  6 07:48 sshpipe-2
drwxr-xr-x  4 root wheel 6 Jun  6 07:48 webmail-1
drwxr-xr-x  4 root wheel 6 Jun  6 07:48 webmail-2

# jls
   JID  IP Address      Hostname                      Path
     1  216.185.71.108  pas-redmine.hamilton.harte-ly /zroot/iocage/jails/03929fef-5d95-4ebb-a1aa-dbb167f22a03/root
     2  216.185.71.34   dns03.harte-lyne.ca           /zroot/iocage/jails/dns03-2/root
     3  216.185.71.57   imap.hamilton.harte-lyne.ca   /zroot/iocage/jails/imap-119/root
     4  216.185.71.32   mx32.harte-lyne.ca            /zroot/iocage/jails/mx32-2/root
     5  216.185.71.114  sshpipe-2.hamilton.harte-lyne /zroot/iocage/jails/sshpipe-2/root
     6  216.185.71.96   webmail-1.hamilton.harte-lyne /zroot/iocage/jails/webmail-1/root
     7  216.185.71.106  webmail-2.hamilton.harte-lyne /zroot/iocage/jails/webmail-2/root
 
Here is the fix:

1. iocage stop 03929fef-5d95-4ebb-a1aa-dbb167f22a03

2. zfs create zroot/iocage/jails/pas-redmine-2-old

3. zfs rename zroot/iocage/jails/pas-redmine-2/root zroot/iocage/jails/pas-redmine-2-old/root

4. zfs rename zroot/iocage/jails/pas-redmine-2 zroot/iocage/jails/pas-redmine-2-orig

5. iocage rename 03929fef-5d95-4ebb-a1aa-dbb167f22a03 pas-redmine-2

6. iocage start pas-redmine-2
 
Back
Top