Re: Getting ZFS pools back.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Getting ZFS pools back.

Warner Losh
On Sun, Apr 29, 2018 at 11:57 AM, Jan Knepper <[hidden email]> wrote:

> On 04/29/2018 13:27, Willem Jan Withagen wrote:
>
>> Trouble started when I installed (freebsd-update) 11.1 over a running
>> 10.4. Which is sort of scarry?
>>
> This does sounds 'scary' as I am planning to do this in the (near)
> future...
>
> Has anyone else experienced issues like this?
>
> Generally I do build the new system software on a running system, but then
> go to single user mode to perform the actual install.
>
> I have done many upgrades like that over 18 or so years and never seen or
> heard of an issue alike this.


11.x binaries aren't guaranteed to work with a 10.x kernel. So that's a bit
of a problem. freebsd-update shouldn't have let you do that either.

However, most 11.x binaries work well enough to at least bootstrap / fix
problems if booted on a 10.x kernel due to targeted forward compatibility.
You shouldn't count on it for long, but it generally won't totally brick
your box. In the past, and I believe this is still true, they work well
enough to compile and install a new kernel after pulling sources. The 10.x
-> 11.x syscall changes are such that you should be fine. At least if you
are on UFS.

However, the ZFS ioctls and such are in the bag of 'don't specifically
guarantee and also they change a lot' so that may be why you can't mount
ZFS by UUID. I've not checked to see if there's specifically an issue here
or not. The ZFS ABI is somewhat more fragile than other parts of the
system, so you may have issues here.

If all else fails, you may be able to PXE boot an 11 kernel, or boot off a
USB memstick image to install a kernel.

Generally, while we don't guarantee forward compatibility (running newer
binaries on older kernels), we've generally built enough forward compat so
that things work well enough to complete the upgrade. That's why you
haven't hit an issue in 18 years of upgrading. However, the velocity of
syscall additions has increased, and we've gone from fairly stable (stale?)
ABIs for UFS to a more dynamic one for ZFS where backwards compat is a bit
of a crap shoot and forward compat isn't really there at all. That's likely
why you've hit a speed bump here.

Warner
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Getting ZFS pools back.

Craig Leres-3
On 04/29/18 11:34, Warner Losh wrote:
> If you always install a new kernel and reboot
> (especially across major releases) and then install the new binaries,
> you're safe.

I upgraded 40+ systems from 10.3-RELEASE to 11.1-RELEASE over the last
few weeks including 8 or so with zfs partitions (but all boot off of
ufs2). The work flow I converged on was:

  - (I use rcs for configs so) co -l all customized config files
  - Check /etc/freebsd-update.conf for the desired config
  - Download the upgrade updates (freebsd-update upgrade -r 11.1-RELEASE)
  - Check /etc/rc.conf and disable kern_securelevel if enabled
  - Check/update /etc/resolv.conf if using bind9*
  - Switch to /usr/bin/sshd if using openssh-portable
  - Copy and install custom 11.1 kernel from my build server
  - Stop most services
  - Save a list of installed packages:
      pkg info|sed -e 's/-[0-9a-zA-Z._,]*  *.*//' > /var/tmp/a
  - Remove all packages (pkg-static delete -fya)
  - Reboot
  - Run "freebsd-update install" three times
  - Reinstall packages:
      pkg update -f
      pkg clean -ay
      pkg install -y `cat /var/tmp/a`
  - Check/reset/checkin configs and reboot

I had zero^H^H^H^Hno zfs issues.

On 04/29/18 11:32, Willem Jan Withagen wrote:
 > Most of my upgrades went smooth, other than being pestered by
 > files that are only changed in verssion no and/or comments.

I also find this annoying but started manually updating things that were
problematic before starting which minimized freebsd-update merging.

                Craig
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"