Upgrading your ZFS root pool's version

Posted by Ceri Davies Mon, 21 Dec 2009 22:23:00 GMT

We, apparently randomly, had a Solaris 10 host reboot and fail to come back up a couple of weeks ago.

On investigation, GRUB was failing to load the menu.lst file from the root pool and the Solaris GRUB findroot extension was failing to find any boot signatures, despite the pool on the disk being consistent and in good health.

As we couldn’t find any symptoms other than “it doesn’t work”, we rebuilt the machine and moved on with our lives. Until today, when it happened again…

This time, we knew we had to fix it. An audit of the commands run on the system highlighted a possible candidate; the system was installed from Solaris 10 Update 7 and had recent kernel patches installed, enabling a newer zpool version.

We periodically monitor the output of zpool status -x to check for ZFS problems. When a later zpool version is available, this command returns output suggested that the zpool be upgraded – this is an online operation with no immediately visible ill effects and thus had been done in order to “shut ‘zpool status’ up”.

However, when the ZFS root pool’s version is upgraded, it’s also necessary to teach GRUB about the new version - this is done by running the command /boot/solaris/bin/update_grub and if you fail to do so, the system will fail to boot the next time it comes up.

I haven’t seen this requirement documented anywhere, but it certainly makes sense. There’s a potential CR here for having zpool upgrade emit a warning if a zpool has a filesystem which has the bootfs property set. I also think that zpool status -x probably shouldn’t warn about available version upgrades, as it’s documented in the manpage to “[o]nly display status for pools that are exhibiting errors or are otherwise unavailable”.

Either way, you do learn something new every day.

Posted in  | no comments | no trackbacks

Comments

Trackbacks

Use the following link to trackback from your own site:
http://typo.submonkey.net/articles/trackback/2498

(leave url/email »)

   Preview comment