OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: devhunter55 on March 12, 2022, 12:32:55 pm

Title: ZPOOL Features - any recommendations ?
Post by: devhunter55 on March 12, 2022, 12:32:55 pm
Dear all

is there any recommendation on that : (did see this after going to FreeBSD 13).
Just enabling or not ?

  pool: zroot
 state: ONLINE
status: Some supported and requested features are not enabled on the pool.
        The pool can still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(7) for details.
Title: Re: ZPOOL Features - any recommendations ?
Post by: dinguz on March 12, 2022, 02:02:33 pm
Your zfs pool has probably been created in an older OS release. IMHO there is no harm in upgrading it by doing 'zpool upgrade'.
The only thing that may be troublesome is that you can't downgrade to older OS releases anymore, if you run into problems, because they can't read the newer disk format. But then again, the preferred way of going back and forth between OS or OPNsense releases is by doing a fresh install of the version you want and then restore a configuration backup (config.xml). Not by using OS-based techniques such as disk images / snapshots and such.
Title: Re: ZPOOL Features - any recommendations ?
Post by: devhunter55 on March 15, 2022, 02:54:49 pm
Thx dinguz for your answer .. i asked, because on Proxmox systems using zfs there can be an issue when using grub boot method and upgrading the zpool features.

My expecation was/is - when upgrading opnsense to a new freedbsd version, the zpool features will be upgraded, too. I'm not sure, if this is the case.

Anyway .. once i had to do zfs rollback from version 22.1.2 to 22.1.1 .. maybe this has to do with that.
Title: Re: ZPOOL Features - any recommendations ?
Post by: franco on March 15, 2022, 04:03:28 pm
OS is the same for 22.1, and yes it's using a different ZFS than the prior versions.

> My expecation was/is - when upgrading opnsense to a new freedbsd version, the zpool features will be upgraded, too.

I'm not aware of a FreeBSD mechanism of "zfs upgrade" which doesn't mean there isn't one, but at least from the OPNsense perspective there is nothing doing it automatically since we don't use most of the FreeBSD automatic scripts from rc.d and neither do we use their software upgrade scripts.


Cheers,
Franco
Title: Re: ZPOOL Features - any recommendations ?
Post by: Patrick M. Hausen on March 15, 2022, 04:32:23 pm
There is no automatic mechanism, but this command will do it:
Code: [Select]
zpool upgrade zroot
The important point is that you must update the boot loader when you do that. How to do that depends on your boot method.

For legacy BIOS boot of a GPT partitioned disk it is something like:
Code: [Select]
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0if ada0 is your boot disk. If you have e.g. a mirrored installation of 2 SATA disks it's probably best to apply the same command to ada1.

For UEFI boot it's like this:
Code: [Select]
mount -t msdosfs /dev/ada0p1 /mnt
cp /boot/gptboot.efi /mnt/efi/boot/BOOTx64.efi
umount /mnt
To apply to a second disk you can then use:
Code: [Select]
dd if=/dev/ada0p1 of=/dev/ada1p1
Again, your device names may be different. Be sure to know what you are doing and what your boot method and partition layout looks like.

HTH,
Patrick
Title: Re: ZPOOL Features - any recommendations ?
Post by: jphylips on March 17, 2022, 03:03:19 pm
Hi Patrick,

I'm in the same boat as devhunter55, where zroot requires a zfs upgrade. However, I don't want to render my firewall unbootable after running the 'zpool upgrade zroot' command. Would it be a risk or inadvisable not to upgrade the pool?

Kind regards
Jan-Willem
Title: Re: ZPOOL Features - any recommendations ?
Post by: Patrick M. Hausen on March 17, 2022, 03:08:53 pm
If you upgrade your zpool you must update the boot loader as I described.

BTW: by no means does zroot require an update. The pool upgrade is entirely optional.
Title: Re: ZPOOL Features - any recommendations ?
Post by: devhunter55 on April 16, 2022, 11:09:24 am
Hey Patrick, thanks very much for your great answer.
I think, this will/can help a lot of poeple to do the right things.

Strange - but on the TrueNAS system i'm using, i never touched the the bootcodes (neither EFI, nof legacy BIOS) and i never had troubles to boot after zfs pool upgrade.

The answer from FRANCO is clear - there is no change made on the zpools from opnsense when upgrading opnsense. Good to know.

And yes, as Patrick mentioned, the zpool upgrade is optional as long you don't need any zfs features on the pool (normally you don't).

And be careful also, when upgrade the zpool - if you're getting troubles in any way - and you may think - no problem, i can do the - quick & easy - restore with zfs - the zpool was changed and the zfs snaps are into the zpool - so if you have got zpool related issues, the zfs rollback may not solve the issue (at least i do suppose so).
Title: Re: ZPOOL Features - any recommendations ?
Post by: Vesalius on April 16, 2022, 02:56:39 pm
And yes, as Patrick mentioned, the zpool upgrade is optional as long you don't need any zfs features on the pool (normally you don't).
Won’t any features available and or used in the prior versions of ZFS continue working just fine? It’s only the new features, draid for example, that will not work on zpools that have not been upgraded.
Title: Re: ZPOOL Features - any recommendations ?
Post by: cookiemonster on April 16, 2022, 11:01:19 pm
And yes, as Patrick mentioned, the zpool upgrade is optional as long you don't need any zfs features on the pool (normally you don't).
Won’t any features available and or used in the prior versions of ZFS continue working just fine? It’s only the new features, draid for example, that will not work on zpools that have not been upgraded.
That is correct.