Updating Solaris 11 without fear

Quickly, here’s how I upgrade my Solaris 11 box, which has 4 SATA disks. Thr first 3 disks are part of a rpool, and the 4th disk a scratch disk or previous backup.

Before I did anything my disk config looked like this – a 3-mirror RAID 1 array:

  pool: rpool
 state: ONLINE

        NAME          STATE     READ WRITE CKSUM
        rpool         ONLINE       0     0     0
          mirror-0    ONLINE       0     0     0
            c3t0d0s0  ONLINE       0     0     0
            c3t1d0s0  ONLINE       0     0     0
            c3t2d0s0  ONLINE       0     0     0

and c3t3d0s0 is a fourth disk with a previous backup.

Step 1, split off the third disk in case of problems:

# zpool split -R /mnt rpool rpoolbackup c3t2d0s0
# zpool export rpoolbackup

Step 2, mount the update ISO from Oracle:

# mount -o ro,loop -F hsfs /root/SOL11_1111_SRU6_06_INCR_REPO.iso /mnt

Step 3, Perform the update:

# /usr/bin/pkg set-publisher -g file:///mnt/repo solaris
# /usr/bin/pkg update
# umount /mnt

Step 4, Rename as desired, activate, and reboot

# beadm activate solaris
# beadm rename solaris-1 solaris11-sru6
# beadm activate solaris11-sru6
# init 6

Step 5, Remove the upgrade repo

# /usr/bin/pkg unset-publisher solaris
# /usr/bin/pkg set-publisher -g http://pkg.oracle.com/solaris/release/ solaris

Step 6, Swap the target 2 and 3 disks. Do this so that the previous backup becomes the third mirror and the fourth disk is the split off mirror

# cfgadm -a | grep c3
sata6/0::dsk/c3t0d0            disk         connected    configured   ok
sata6/1::dsk/c3t1d0            disk         connected    configured   ok
sata6/2::dsk/c3t2d0            disk         connected    configured   ok
sata6/3::dsk/c3t3d0            disk         connected    configured   ok

# cfgadm -c unconfigure sata6/2
Unconfigure the device at: /devices/pci@0,0/pci1458,b002@11:2
This operation will suspend activity on the SATA device
Continue (yes/no)? y
# cfgadm -c unconfigure sata6/3
Unconfigure the device at: /devices/pci@0,0/pci1458,b002@11:3
This operation will suspend activity on the SATA device
Continue (yes/no)? y

[swap, exchange disks]

Step 7, rescan disks

# cfgadm -c configure sata6/2
# cfgadm -c configure sata6/3

Step 8, reattach the third mirror
# zpool attach -f rpool c3t1d0s0 c3t2d0s0
Make sure to wait until resilver is done before rebooting.

Step 9, if necessary, we can import the previous rpool from the fourth disk:
# zpool import -R /mnt rpoolbackup


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: