How to update the ZFS?

Bostjan

Contributor
Joined
Mar 24, 2014
Messages
122
My server is at TrueNAS-12.0-U8. How to find out what version the ZFS is on? How to update/upgrade the ZFS?
Thanks.
 

awasb

Patron
Joined
Jan 11, 2021
Messages
415
Code:
zpool upgrade
 

Bostjan

Contributor
Joined
Mar 24, 2014
Messages
122
‘Nothing’ happens.

root@nas[~]# zpool upgrade

This system supports ZFS pool feature flags.

All pools are formatted using feature flags.


Some supported features are not enabled on the following pools. Once a
feature is enabled the pool may become incompatible with software
that does not support the feature. See zpool-features(5) for details.

root@nas[~]#
 

awasb

Patron
Joined
Jan 11, 2021
Messages
415
To see the flags:

Code:
zpool upgrade -v


To upgrade all pools:

Code:
zpool upgrade -a


To learn even more:

Code:
man zpool
 
Last edited:

HarryMuscle

Contributor
Joined
Nov 15, 2021
Messages
161
Are you referring to the ZFS version of the pool that you want to upgrade or the ZFS binaries installed on the system? If it's the latter, the answer is you can't, not without breaking things probably and going against the ideology of TrueNAS being an appliance.

Thanks,
Harry
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
ZFS binaries installed on the system? If it's the latter, the answer is you can't, not without breaking things probably and going against the ideology of TrueNAS being an appliance.

ZFS isn't just "binaries". The binaries on the system aren't actually that important. All the important work is in the kernel. You really need to update the system in order to effect any changes to ZFS.
 

Bostjan

Contributor
Joined
Mar 24, 2014
Messages
122
Is ZFS/zpool automaticaly upgraded when TrueNAS is upgraded or do we need to do it manualy (by pressing a button)?
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
when you go to shell and type zpool status it will show your pool status, if an update is available for your pools and the command you need to type to update a pool if an update is available
 

Bostjan

Contributor
Joined
Mar 24, 2014
Messages
122
As I said before, it does not work.

root@nas[~]# zpool status pool: freenas-boot state: ONLINE status: Some supported 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(5) for details. scan: scrub repaired 0B in 00:13:16 with 0 errors on Sun Jan 30 03:58:16 2022 config: NAME STATE READ WRITE CKSUM freenas-boot ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 da0p2 ONLINE 0 0 0 da1p2 ONLINE 0 0 0 errors: No known data errors root@nas[~]# zpool upgrade This system supports ZFS pool feature flags. All pools are formatted using feature flags. Some supported features are not enabled on the following pools. Once a feature is enabled the pool may become incompatible with software that does not support the feature. See zpool-features(5) for details. POOL FEATURE --------------- freenas-boot multi_vdev_crash_dump spacemap_histogram enabled_txg hole_birth extensible_dataset embedded_data bookmarks filesystem_limits large_blocks large_dnode sha512 skein userobj_accounting encryption project_quota device_removal obsolete_counts zpool_checkpoint spacemap_v2 allocation_classes resilver_defer bookmark_v2 redaction_bookmarks redacted_datasets bookmark_written log_spacemap livelist device_rebuild zstd_compress root@nas[~]#
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194

Bostjan

Contributor
Joined
Mar 24, 2014
Messages
122
The boot poll is used only by TrueNAS. So the whole stack is under one developer - iXsystems. So everyhitng should work here with no problems.
iocage (and jails) are on "data" pool.

For a while FreeNAS and latter on TrueNAS nagged you to upgrade the pool(s). Why?
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
As I said before, it does not work.

Well you have to specify which pool you want to upgrade e.g. "zpool upgrade freenas-boot"
If you just type zpool upgrade truenas doenst know which pool you want to upgrade.

But as @Ericloewe wrote be sure to check out the feature flags and make sure you really have to update your pools or if it's fine as it is.
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
If TrueNAS/FreeNAS is meeting your needs now, you don't HAVE TO upgrade your pool(s).

It's up to you to review the current features (see the link that @Ericloewe gave you above) and decide if you need any of them. If you decide that you do, then consider upgrading your pool, at the same time understanding that, if you do upgrade, you won't be able to roll back to a previous boot environment that doesn't natively have the feature flag set of the upgrade.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
f you do upgrade, you won't be able to roll back to a previous boot environment that doesn't natively have the feature flag set of the upgrade
* Depending on the exact feature

For a while FreeNAS and latter on TrueNAS nagged you to upgrade the pool(s). Why?
Well, let's look at the various moving parts:
  • The boot pool has historically been more limited in terms of features. This was a huge deal with GRUB (and still is for systems unfortunate enough to depend on GRUB), far less so with the FreeBSD bootloader - but there are still occasional features that take longer to support there, such as encryption (which, IIRC, lagged behind for a release or so).
  • Data pools are very likely to benefit from new feature flags, but many of these break backwards compatibility.
  • Only recently did zpool status gain support for a "I want these feature flags, don't offer me any more" type of operation.
  • It's fairly simple to always parse zpool status output and warn the user that new feature flags are available, but deciding not to warn the user tends to require either hacks (which are okay for something like a boot pool, which is a known quantity) or the sort of infrastructure that did not exist in ZFS and was never implemented on the FreeNAS/TrueNAS side of things.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
First, all of the "how to" answers here are wrong--the way you should upgrade your pool is using the GUI. But the GUI doesn't allow doing that for the boot pool, and that's fine. Put more clearly, there's no reason at all to upgrade the ZFS feature flags for your boot pool. Don't do it, and don't worry about it.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
I only update the ZFS feature flags after I have been running a particular version of TrueNAS for a while and know that I won't be going back to a previous version of the software.

I have some backup disks that are 4 years old and I have not updated the ZFS flags on them. There are no problems mounting them or reading data from them.
 

awasb

Patron
Joined
Jan 11, 2021
Messages
415
First, all of the "how to" answers here are wrong--the way you should upgrade your pool is using the GUI. But the GUI doesn't allow doing that for the boot pool, and that's fine. Put more clearly, there's no reason at all to upgrade the ZFS feature flags for your boot pool. Don't do it, and don't worry about it.
Could you please give some more technical details on why not to do it?

My most ancient ZFS-Filer is an OmniOS (installed late 2013: r151008). It's got updated through the years without any (ZFS) hiccups. Neither updating the rpool, nor the data pools.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Could you please give some more technical details on why not to do it?
I don't know that I can give technical details beyond what's already been shared--there's a non-zero risk that the FreeBSD loader won't boot from the pool with all the features enabled, and there's zero benefit to enabling them.
 

awasb

Patron
Joined
Jan 11, 2021
Messages
415
Thank you.

Over here (as far as documented by omnios devs) some features concerning resilver time, lz4 performance, l2arc (header) compression, kvm images on zfs etc. changed quite a bit. Not all those features were/are relevant for root pools. Agreed.

But the risk seems negligible, as long as you can afford "2 minutes more downtime" and/or have a mirror/fallback machine/backup.
 
Last edited:
Top