Solaris 10: upgrading root zfs pool: rewrite GRUB!

| | Comments (3) | TrackBacks (0)
If you accidentally upgraded your root zfs pool (which is not recommended until it is supposed to be done from Oracle) do not forget to update your boot signature,  your boot archive and your grub installation -

but do not reboot before having done this, otherwise the system won't boot any more.

Don't upgrade the root pool! You won't be able to repair your system when booting from the actual Solaris 10 boot CD (09/10) as the root pool cannot be mounted then. The following steps are to make sure that your system will at least boot when you did the upgrade accidentally.

Example:

# zpool status
  pool: rpool
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          c1t0d0s0  ONLINE       0     0     0

errors: No known data errors

Now you're a little bit too fast and you upgrade the wrong pool (not the big storage pool you wanted to upgrade but the zfs root pool:

# zpool upgrade rpool
This system is currently running ZFS pool version 29.

Successfully upgraded 'rpool' from version 22 to version 29

# zfs upgrade -r rpool
6 filesystems upgraded

To clear the situation just do this:

# bootadm update-archive
# touch /rpool/boot/grub/bootsign/pool_rpool
# /boot/solaris/bin/update_grub
Creating GRUB menu in /
Installing grub on /dev/rdsk/c1t0d0s0
stage1 written to partition 0 sector 0 (abs 16065)
stage2 written to partition 0, 273 sectors starting at 50 (abs 16115)
# reboot

This will work, after reboot zpool status tells:

# zpool status
  pool: rpool
 state: ONLINE
 scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          c1t0d0s0  ONLINE       0     0     0

errors: No known data errors





0 TrackBacks

Listed below are links to blogs that reference this entry: Solaris 10: upgrading root zfs pool: rewrite GRUB!.

TrackBack URL for this entry: http://southbrain.com/mt/mt-tb.cgi/194

3 Comments

Well, if I have already completely unbootable system (after patch and reboot), whats next? How to boot dead rpool? I cannot import them, I cannot boot from it, I cannot boot it from boot archive (it comes to reboot cycles when booting kernel from rpool) also after re-installing grub from LiveUSB Sol11.

How to boot my rpool?

Only wait S10U10 ISO and completely re-install OS?

PS. Some explanation. I'm not stupid, this is production server with automatic patching procedure and zero administration.

Even with applied patches your rpool version should not have changed as this is (IMHO!) not done automatically.

It is perhaps another problem?

We've had similar issues with SPARC-based solaris machines, as well as the x86 architecture.

After fixing the boot-archive, you can rewrite the bootblock on a SPARC machine with:

#installboot /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/

Where is typically c0t0d0s0 or c1t0d0s0.

In cases where the rpool is a zfs mirror set, I've written to both drives in the mirror, to be safe (for example: c0t0d0s0 and c0t1d0s0).

I'm both comforted and dismayed to find it isn't just us affected by this.

December 2015

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

About

This blog is owned by:

Pascal Gienger
J├Ągerstrasse 77
8406 Winterthur
Switzerland


Google+: Profile
YouTube Channel: pascalgienger