Note for those pulling in new ZFS feature flags

Trond Endrestøl Trond.Endrestol at fagskolen.gjovik.no
Mon Apr 7 16:47:03 UTC 2014


On Mon, 7 Apr 2014 18:20+0200, Trond Endrestøl wrote:

> On Mon, 7 Apr 2014 11:30-0400, Chris Nehren wrote:
> 
> > On Mon, Apr 07, 2014 at 17:05:32 +0200, Trond Endrestøl wrote:
> > > See:
> > > 
> > > http://svnweb.freebsd.org/base/stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c?view=markup#l4992
> > > 
> > > Consider this a lesson learned. Yes, I too was bitten by this once, 
> > > but never again. ;-) Luckily, I recovered using a snapshot image.
> > 
> > That's funny, because I *specifically* noted the absence of that 
> > message when I upgraded my pool and spent about 5 minutes wondering 
> > if it was needed or not.
> 
> Browsing through the code, it appears that the message will only be 
> shown if the current root fs is on one of the zpools you are 
> upgrading.
> 
> I chased this chain in zpool_main.c:
> 
> zpool_do_upgrade()
> for_each_pool()
> upgrade_one() (used as a callback function by for_each_pool())
> root_pool_upgrade_check()
> is_root_pool()
> 
> Maybe the message should be shown unconditionally after the fact when 
> all zpool upgrades has taken place, to warn the novice user and 
> friendly remind the seasoned user.

I believe the message was shown unconditionally in the past.

BTW. the UPDATE file has a couple of entries on the subject, although 
they can easily be missed, I guess:

20130208:
        A new compression method (lz4) has been merged to -HEAD.  Please
        refer to zpool-features(7) for more information.

        Please refer to the "ZFS notes" section of this file for information
        on upgrading boot ZFS pools.

and:

        ZFS notes
        ---------
        When upgrading the boot ZFS pool to a new version, always follow
        these two steps:

        1.) recompile and reinstall the ZFS boot loader and boot block
        (this is part of "make buildworld" and "make installworld")

        2.) update the ZFS boot block on your boot drive

        The following example updates the ZFS boot block on the first
        partition (freebsd-boot) of a GPT partitioned drive ad0:
        "gpart bootcode -p /boot/gptzfsboot -i 1 ad0"

        Non-boot pools do not need these updates.

> > Either way, I think I'll opt to doing the bootcode thing every time 
> > as well.
> 
> (Y)

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+


More information about the freebsd-stable mailing list