FreeBSD 11.2-RELEASE was released a few days ago. This means it’s time to upgrade the FreeBSD running on my nas.

For the most part, this was all what I did:

# freebsd-update -r 11.2-RELEASE upgrade
# freebsd-update install
# reboot
# freebsd-update install

After it’s been upgraded, I also need to update the Zpool.

root@nas:~ # zpool status
  pool: zroot
 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(7) for details.
  scan: scrub repaired 0 in 0h0m with 0 errors on Tue Jan 23 23:54:42 2018
config:

        NAME        STATE     READ WRITE CKSUM
        zroot       ONLINE       0     0     0
          gpt/zfs0  ONLINE       0     0     0

errors: No known data errors

Let’s upgrade the zpool as suggested:

root@nas:~ # zpool upgrade zroot
This system supports ZFS pool feature flags.

Enabled the following features on 'zroot':
  device_removal
  obsolete_counts
  zpool_checkpoint

If you boot from pool 'zroot', don't forget to update boot code.
Assuming you use GPT partitioning and da0 is your boot disk
the following command will do it:

        gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0

root@nas:~ # 

Next is to update the boot code. If for whatever reason you’re following this step to update zpool (zroot) on your FreeBSD, make sure you know what is your boot disk is. In my case, it’s not da0. To find out run the following command:

root@nas:~ # gpart show
=>       34  488397101  ada4  GPT  (233G)
         34       1024     1  freebsd-boot  (512K)
       1058    4194304     2  freebsd-swap  (2.0G)
    4195362  484201766     3  freebsd-zfs  (231G)
  488397128          7        - free -  (3.5K)

It’s ada4, and the partition the boot sits on is ada4p1.

root@nas:~ # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada4
partcode written to ada4p1
bootcode written to ada4

To upgrade non-zroot zpool, just run zpool upgrade pool_name.

Ref: