ZPOOL Features - any recommendations ?

Started by devhunter55, March 12, 2022, 12:32:55 PM

Previous topic - Next topic
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.

March 12, 2022, 02:02:33 PM #1 Last Edit: March 12, 2022, 02:05:41 PM by dinguz
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.
In theory there is no difference between theory and practice. In practice there is.

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.

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

There is no automatic mechanism, but this command will do it:
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:
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
if 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:
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:
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
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

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

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.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

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).

April 16, 2022, 02:56:39 PM #8 Last Edit: April 16, 2022, 04:20:16 PM by Vesalius
Quote from: devhunter55 on April 16, 2022, 11:09:24 AMAnd 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.

Quote from: Vesalius on April 16, 2022, 02:56:39 PM
Quote from: devhunter55 on April 16, 2022, 11:09:24 AMAnd 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.