ZFS Upgrading ZFS pools

I have updated my server from FreeBSD 10.1-STABLE #0 r275754 to FreeBSD 10.1-STABLE #0 r282198. When I run zpool status now all 3 of my pools say:

Code:
  pool: zstore
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.

I haven't run zpool upgrade yet as I wanted to check if this would cause any issues with my bootable pool? The last time I did this I remember having to update the bootcode but there doesn't seem to be a warning this time so I just wanted to doublecheck first!
 
I think it's always good procedure to make sure the matching bootcode is installed.

It might warn you to upgrade the bootcode when you actually run the upgrade, rather than in the zpool status output.
 
I think it's always good procedure to make sure the matching bootcode is installed.

It might warn you to upgrade the bootcode when you actually run the upgrade, rather than in the zpool status output.

I just ran sudo zpool upgrade zstore which is purely a storage pool (ie: not bootable) and it said:
Code:
This system supports ZFS pool feature flags.

Enabled the following features on 'zstore':
  large_blocks

Do I need to update my bootcode on the bootable pool after upgrading it?
 
If you've only updated a pool which isn't used for booting, then I can't see why you'd need to upgrade bootcode.

I think the warning might actually check the bootfs pool property and only show up if it's set.
 
If you've only updated a pool which isn't used for booting, then I can't see why you'd need to upgrade bootcode.

I think the warning might actually check the bootfs pool property and only show up if it's set.

I think I have confused myself...

I have 3 pools:

A bootable USB pool called "bootdir". Device name is da3
A ZFS root pool called "zroot". Device name is da0 and da1 (its mirrored)
And a storage pool called "zstore". Device name is da2

I have now upgraded all 3 pools. Here is the output:

Code:
(~)$ sudo zpool upgrade zroot
This system supports ZFS pool feature flags.

Enabled the following features on 'zroot':
  large_blocks

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

(~)$ sudo zpool upgrade bootdir
This system supports ZFS pool feature flags.

Enabled the following features on 'bootdir':
  large_blocks

I thought I would have had to apply the newly updated bootcode onto da3 as that is the bootable device so why is it giving me the warning for zroot?
 
Also, zpool get bootfs gives:
Code:
NAME  PROPERTY  VALUE  SOURCE
bootdir  bootfs  bootdir  local
zroot  bootfs  -  default
zstore  bootfs  -  default

I found my notes on when I built the server and I used this for the bootable USB:

Code:
gpart create -s gpt da3
gpart add -t freebsd-boot -a 4k -s 512K -l usbboot da3
gpart add -t freebsd-zfs -a 4k -b 1M -l usbcruzer da3
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da3

So I'm assuming I need to run gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da3 now that I have upgraded my bootable pool?

Edit:

gpart show:

Code:
=>  34  31266749  da3  GPT  (15G)
  34  6  - free -  (3.0K)
  40  1024  1  freebsd-boot  (512K)
  1064  984  - free -  (492K)
  2048  31264728  2  freebsd-zfs  (15G)
  31266776  7  - free -  (3.5K)
 
sudo gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da3:
Code:
bootcode written to da3

I'll test rebooting the server tomorrow. Thanks for all the help!
 
Looking at the source it appears that the FreeBSD code checks if the pool has a dataset mounted on /, and gives that warning if it does. So it doesn't seem to warn correctly for systems where your boot pool and root pool are separate. (I'm under the impression that the kernel module, which will be updated with the OS, mounts the root partition; However the bootcode needs to be updated to be able to read the boot device before it can even read the kernel in the first place - so it's the boot pool that's the relevant one).

Using the bootfs property to test for a bootable pool seems a better option for me, as I'm sure that's required on pools that are booted from. I don't know why it wasn't done that way?
 
I have just rebooted the server and all was fine. So, to anyone who upgrades their pools, be VERY careful that you update your bootcode on the correct device/drive!
 
Looking at the source it appears that the FreeBSD code checks if the pool has a dataset mounted on /, and gives that warning if it does. So it doesn't seem to warn correctly for systems where your boot pool and root pool are separate. (I'm under the impression that the kernel module, which will be updated with the OS, mounts the root partition; However the bootcode needs to be updated to be able to read the boot device before it can even read the kernel in the first place - so it's the boot pool that's the relevant one).

Using the bootfs property to test for a bootable pool seems a better option for me, as I'm sure that's required on pools that are booted from. I don't know why it wasn't done that way?

Thanks for the explanation. I was wondering why it was telling me to update my bootcode on the zroot device rather than the bootdir! You really need to be careful here otherwise you'll update the wrong device and your server won't boot up anymore...
 
Assuming you use GPT partitioning and da0 is your boot disk the following command will do it:
Read everything first. Act on it second. The text reminding about the boot code update is just an example. There is no logic going on behind the scenes.
 
Back
Top