Re: changes to the zfs boot (was: Re: git: 72a1cb05cd23 - main - rc(8): Add a zpoolupgrade rc.d script)

From: Alexander Leidinger <Alexander_at_leidinger.net>
Date: Sat, 12 Nov 2022 08:10:35 UTC
Quoting Warner Losh <imp@bsdimp.com> (from Wed, 9 Nov 2022 08:54:33 -0700):

> On Wed, Nov 9, 2022 at 5:46 AM Alexander Leidinger <Alexander@leidinger.net>
> wrote:

> While most of these options look OK on the surface, I'd feel a lot better
> if there were tests for these to prove they work. I'd also feel better if
> the ZFS experts could explain how those come to be set on a zpool
> as well. I'd settle for a good script that could be run as root (better

It is explained in the zpool-features man page.

> would be not as root) that would take a filesystem that was created
> by makefs -t zfs and turn on these features after an zpool upgrade.

Script attached. Maybe a little bit too verbose, but you can see which  
features are active directly, and which ones only enabled.

It expects a zroot.img in the current directory and creates copies to  
zroot_num_featurename.img where it enables the features. In the  
beginning are some variables to adapt to pool/image name and  
destination directory.

Bye,
Alexander.
-- 
http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org    netchild@FreeBSD.org  : PGP 0x8F31830F9F2772BF