Looking for jail repair/migration guidance

Status
Not open for further replies.

ChrisNAS

Explorer
Joined
Apr 14, 2017
Messages
71
Hey there..

I have been using a jail to host my nextcloud and other projects for a while now. Few days ago, mariadb started going down. Not sure what the problem was... but I thought maybe need to update installed packages. Once I started that, I got:

pkg: repository FreeBSD contains packages for wrong OS version

Code:
:~ # uname -KU
1101505 1100122


uname -a
FreeBSD myserver 11.1-STABLE FreeBSD 11.1-STABLE #0 r321665+9902d126c39(freenas/11.1-stable): Tue Aug 21 12:24:37 EDT 2018	 root@nemesis.tn.ixsystems.com:/freenas-11-releng/freenas/_BE/objs/freenas-11-releng/freenas/_BE/os/sys/FreeNAS.amd64  amd64


That message lead me to:

Code:
pkg -o OSVERSION=1101505 update -f

pkg -o OSVERSION=1101505 upgrade



That ultimately lead me to packages upgrading... however, now I cannot start mariadb at all. I just get:

Code:
/usr/local/libexec/mysqld: Undefined symbol "fdatasync"


I've been searching to fix that, but no luck yet. I'm seeing others mention that fdatasync is not part of freebsd prior to 11.1 which makes this more confusing for me since the uname showing 11.1 stable.

Not sure what to do here... I need to get this back up and running before the fam starts complaining about the nextcloud files... :(

My goal:

1) Get this jail back to operational.
2) Migrate from this warden jail to the iocage jail - need to find a good recent guide for this.

If anyone can guide me here I'd be very grateful.

EDIT: I do have snapshots on the jails dataset. I suppose I could go back, but worried about the nextcloud storage directory and db matching.

Thank you
 
Last edited:

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,974
What is the output of freebsd-version from the jail shell?
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,974
EDIT: I do have snapshots on the jails dataset. I suppose I could go back, but worried about the nextcloud storage directory and db matching.
Unless that changed you shouldn't have anything to worry about.
 

ChrisNAS

Explorer
Joined
Apr 14, 2017
Messages
71
Unless that changed you shouldn't have anything to worry about.

That's good to know... sucks that will lose some work though :(

Code:
 freebsd-version
11.0-RELEASE-p1


Looking to see how to revert or sync the versions... hope its possible.

I'm wondering if supplying the older version to pkg would fix things? Like:

Code:
:~ # pkg -o OSVERSION=1100122 update -f
Updating FreeBSD repository catalogue...
[myserver] Fetching meta.txz: 100%	944 B   0.9kB/s	00:01
[myserver] Fetching packagesite.txz: 100%	6 MiB   6.8MB/s	00:01
Processing entries:   0%
Newer FreeBSD version for package kipi-plugin-timeadjust:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1101001
- running kernel: 1100122
Allow missmatch now?[Y/n]: n <----- wasn't sure what that would do so I hit n
pkg: repository FreeBSD contains packages for wrong OS version: FreeBSD:11:amd64
Processing entries: 100%
Unable to update repository FreeBSD
Error updating repositories!


And host is: FreeNAS-11.1-U6 (I probably should not have updated... UI seems much slower. could this have affected mariadb in the jail?)
 
Last edited:

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,974

ChrisNAS

Explorer
Joined
Apr 14, 2017
Messages
71
Well support for FreeBSD 11.0 has ended so that's your problem. Your best bet is to re do your jail using iocage or use the migration script and convert your jail. @diskdiddler posted a quick how to for using the script and @Jurgen Segaert posted how to fix the empty jail issue that using the script causes.

https://forums.freenas.org/index.ph...tion-script-some-quick-tips-for-others.68597/

Eeek... this feels like having to do surgery as a nurse... where you know some things but are clueless in the overall process.

As a "nurse" here... that thread tells me there's a tool (but doesn't say where) and instructions are not clear enough for those who don't know enough to understand where all these things are done, and also not confident about not ending up in the same situation with not upgradeable iocage jail.

At this point, since I upgraded my FN to U6, based on the known issues, I have to wait to upgrade to 11.2 until at least beta 3. And frankly, I'm so burned out about trying to determine which info/instructions are reliable (at time of needing vs time was written) that for now, I've given up. I managed to get passed the "no rollback button" on snapshots and restore my jail to date known to be working.

In case helps anyone in the same situation... in freenas shell, followed this: http://blog.pepita.org/?p=510

Before doing anything with the zfs, get what you need from the clone(s). I realized after all the below my other snapshots for the jail are now gone.

I did get the "device in use" and had to: zfs unmount -f (forcefully) Not sure what was using it since commands to find out like fname -m was giving me nothing... and maybe that's because my jails are on an NVME disk.. I don't know. But then after unmount the zfs rename worked.

You can use: zfs list to get full path. Then the "<your_jails_pool_name>/jails/<your_bad_jail_name>" path is in the first column (NAME) of the output list.

Code:
(list below is after me completing)

root@server:~ # zfs list
NAME													USED  AVAIL  REFER  MOUNTPOINT
NVME												   70.7G   152G	88K  /mnt/NVME
NVME/Jails											 27.6G   152G   144K  /mnt/NVME/Jails
NVME/Jails/myserver								   12.9M   152G  13.2G  /mnt/NVME/Jails/myserver
NVME/Jails/myserver-auto-20180905.0300-10d-clone	   168K   152G  6.57G  /mnt/NVME/Jails/myserver-auto-20180905.0300-10d-clone
NVME/Jails/myserver_broken							23.9G   152G  7.56G  /mnt/NVME/Jails/myserver_broken


root@server:~ # zfs unmount -f NVME/Jails/myserver

root@server:~ # zfs rename NVME/Jails/myserver   NVME/Jails/myserver_broken

root@server:~ # zfs rename NVME/Jails/myserver-auto-20180904.0300-10d-clone	NVME/Jails/myserver



Go back to Jails in freenas and click the start button... back up and running :) for now... :/
 
Last edited:
Status
Not open for further replies.
Top