Saturday 21 July 2018

Solaris 10 LDOM Kernel Patching using Live Upgrade.

Solaris 10 LDOM Kernel Patching using Live Upgrade.


Here is the procedure to upgrade the Kernel patches in Solaris 10 with ZFS file-system using Live upgrade method


1. Check the the current Kernel version and Confirm whether upgrade is required or not

 root@sol10-ldom:/root:# uname -a
 SunOS sol10-ldom 5.10 Generic_147147-26 sun4v sparc sun4v
  root@sol10-ldom:/root:#

2. Check the existing Boot Environments

 root@sol10-ldom:/root:# lustatus
 ERROR: No boot environments are configured on this system
 ERROR: cannot determine list of all boot environment names

3. Ensure the rpool status is ONLINE

 root@sol10-ldom:/root:# zpool list
 NAME     SIZE  ALLOC   FREE  CAP  HEALTH  ALTROOT
 oracle  31.8G  17.5G  14.3G  55%  ONLINE  -
 rpool   95.8G  66.5G  29.2G  69%  ONLINE  -
4. Ensure the Solaris Release
(If you are upgrading to a new Solaris release please install live upgrade package from new release)
root@sol10-ldom:/root:# cat /etc/release
                   Oracle Solaris 10 1/13 s10s_u11wos_24a SPARC
  Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.
                            Assembled 17 January 2013
5. Check the live upgrade patch version ( It is recommended to install the latest live-upgrade patches)
 root@sol10-ldom:/root:# showrev -p |grep 121430

 Patch: 121430-85 Obsoletes: 121435-04, 121437-02 Requires:  Incompatibles: Packages: SUNWlucfg, SUNWluu, SUNWlur                                                                                 
 Patch: 121428-15 Obsoletes:  Requires: 120235-01, 121430-16 Incompatibles: Packages: SUNWluzone                                                                         
New Version can be found in following link
6. Ensure the live upgrade packages are installed properly
 root@sol10-ldom:/root:# pkginfo -l SUNWlucfg
   PKGINST:  SUNWlucfg
      NAME:  Live Upgrade Configuration
  CATEGORY:  application
      ARCH:  sparc
   VERSION:  11.10,REV=2007.03.09.13.13
   BASEDIR:  /
    VENDOR:  Oracle Corporation
      DESC:  Live Upgrade Configuration
    PSTAMP:  on10-adms-patch20110330171403
  INSTDATE:  Mar 25 2015 17:27
   HOTLINE:  Please contact your local service provider
    STATUS:  completely installed
     FILES:        5 installed pathnames
                   3 shared pathnames
                   3 directories
                  35 blocks used (approx)

 root@sol10-ldom:/root:# pkginfo -l SUNWluu
   PKGINST:  SUNWluu
      NAME:  Live Upgrade (usr)
  CATEGORY:  application
      ARCH:  sparc
   VERSION:  11.10,REV=2005.01.10.00.03
   BASEDIR:  /
    VENDOR:  Oracle Corporation
      DESC:  Live Upgrade (usr)
    PSTAMP:  on28-patch20120604223443
  INSTDATE:  Mar 25 2015 17:29
   HOTLINE:  Please contact your local service provider
    STATUS:  completely installed
     FILES:      161 installed pathnames
                   7 shared pathnames
                  11 directories
                  41 executables
                2552 blocks used (approx)

 root@sol10-ldom:/root:# pkginfo -l SUNWlur
   PKGINST:  SUNWlur
      NAME:  Live Upgrade (root)
  CATEGORY:  application
      ARCH:  sparc
   VERSION:  11.10,REV=2005.01.10.00.03
   BASEDIR:  /
    VENDOR:  Oracle Corporation
      DESC:  Live Upgrade (root)
    PSTAMP:  on28-patch20120604223459
  INSTDATE:  Mar 25 2015 17:29
   HOTLINE:  Please contact your local service provider
    STATUS:  completely installed
     FILES:       40 installed pathnames
                  11 shared pathnames
                   4 linked files
                  15 directories
                  14 executables
                2275 blocks used (approx)
7. Create a Current BE and New BE and specify the name appropriately
root@sol10-ldom:/root:# lucreate -c sol10-build -n sol10_20151108 -p rpool
Analyzing system configuration.
No name for current boot environment.
Current boot environment is named <sol10-build>.
Creating initial configuration for primary boot environment <sol10-build>.
INFORMATION: No BEs are configured on this system.
The device </dev/dsk/c0d0s0> is not a root device for any boot environment; cannot get BE ID.
PBE configuration successful: PBE name <sol10-build> PBE Boot Device </dev/dsk/c0d0s0>.
Updating boot environment description database on all BEs.
Updating system configuration files.
Creating configuration for boot environment <sol10_20151108>.
Source boot environment is <sol10-build>.
Creating file systems on boot environment <sol10_20151108>.
Populating file systems on boot environment <sol10_20151108>.
Analyzing zones.
Duplicating ZFS datasets from PBE to ABE.
Creating snapshot for <rpool/ROOT/s10s_u11wos_24a> on <rpool/ROOT/s10s_u11wos_24a@sol10_20151108>.
Creating clone for <rpool/ROOT/s10s_u11wos_24a@sol10_20151108> on <rpool/ROOT/sol10_20151108>.
Mounting ABE <sol10_20151108>.
Generating file list.
Finalizing ABE.
Fixing zonepaths in ABE.
Unmounting ABE <sol10_20151108>.
Fixing properties on ZFS datasets in ABE.
Reverting state of zones in PBE <sol10-build>.
Making boot environment <sol10_20151108> bootable.
Population of boot environment <sol10_20151108> successful.
Creation of boot environment <sol10_20151108> successful.
8. Check both BE's are created
root@sol10-ldom:/root:# lustatus
Boot Environment           Is       Active Active    Can    Copy
Name                       Complete Now    On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
sol10-build                yes      yes    yes       no     -
sol10-20151108             yes      no     no       yes     -
9. Check the BE status of Both Boot Environments
root@sol10-ldom:/root:# lufslist -n sol10-build
               boot environment name: sol10-build
               This boot environment is currently active.
               This boot environment will be active on next system boot.

Filesystem              fstype    device size Mounted on          Mount Options
----------------------- -------- ------------ ------------------- --------------
/dev/zvol/dsk/rpool/swap swap      34359738368 -                   -
rpool/ROOT/s10s_u11wos_24a zfs       28473121280 /                   -
oracle/sabre            zfs             31744 /app/sabre          -
rpool/export            zfs             88064 /export             -
rpool/export/home       zfs             55296 /export/home        -
oracle                  zfs       16812273152 /opt/oracle         -
oracle/pkgs             zfs             31744 /pkgs               -
rpool                   zfs       81643988480 /rpool         

root@sol10-ldom:/root:# lufslist -n sol10_20151108
               boot environment name: sol10_20151108

Filesystem              fstype    device size Mounted on          Mount Options
----------------------- -------- ------------ ------------------- --------------
/dev/zvol/dsk/rpool/swap swap      34359738368 -                   -
rpool/ROOT/sol10_20151108 zfs            287232 /                   -
oracle/sabre            zfs             31744 /app/sabre          -
rpool/export            zfs             88064 /export             -
rpool/export/home       zfs             55296 /export/home        -
oracle                  zfs       16812273152 /opt/oracle         -
oracle/pkgs             zfs             31744 /pkgs               -
rpool                   zfs       81644261376 /rpool              -
10. Now Apply the per-request patch on the current BE
root@sol10-ldom:/root:# cd /nfs-share/sol10-KJP/10_Recommended_20151108
root@sol10-ldom:/root:# ./installcluster --apply-prereq --s10patchset
Setup .
Recommended OS Patchset Solaris 10 SPARC (2015.11.12)

Application of patches started : 2016.02.25 19:16:34

Applying 120900-04 ( 1 of 10) ... skipped
Applying 121133-02 ( 2 of 10) ... skipped
Applying 119254-92 ( 3 of 10) ... success
Applying 119317-01 ( 4 of 10) ... skipped
Applying 121296-01 ( 5 of 10) ... skipped
Applying 138215-02 ( 6 of 10) ... success
Applying 148336-02 ( 7 of 10) ... success
Applying 146054-07 ( 8 of 10) ... skipped
Applying 142251-02 ( 9 of 10) ... skipped
success

Application of patches finished : 2016.02.25 19:17:13

Following patches were applied :
 119254-92     138215-02     148336-02     125555-16

Following patches were skipped :
 Patches already applied
 120900-04     119317-01     121296-01     146054-07     142251-02
 121133-02
Installation of prerequisite patches complete.

Install log files written :
  /var/sadm/install_data/s10s_rec_patchset_short_2016.02.25_19.16.34.log
  /var/sadm/install_data/s10s_rec_patchset_verbose_2016.02.25_19.16.34.log
11. Now install the 10_Recommended patches on the inactive boot environment using -B option
root@sol10-ldom:/root:# ./installcluster -B sol10_20151108 --s10patchset

Setup ....
Recommended OS Patchset Solaris 10 SPARC (2015.11.12)
Application of patches started : 2016.02.25 19:19:22

Applying 120900-04 (  1 of 392) ... skipped
Applying 121133-02 (  2 of 392) ... skipped
Applying 119254-92 (  3 of 392) ... success
Applying 119317-01 (  4 of 392) ... skipped
Applying 121296-01 (  5 of 392) ... skipped
Applying 138215-02 (  6 of 392) ... success
Applying 148336-02 (  7 of 392) ... success
Applying 146054-07 (  8 of 392) ... skipped
Applying 142251-02 (  9 of 392) ... skipped
Applying 125555-16 ( 10 of 392) ... success
Applying 118367-04 ( 11 of 392) ... skipped
Applying 118666-86 ( 12 of 392) ... success
...
...
...
Applying 151561-01 (384 of 392) ... success
Applying 151615-01 (385 of 392) ... success
Applying 151696-01 (386 of 392) ... success
Applying 151717-01 (387 of 392) ... success
Applying 151719-01 (388 of 392) ... skipped
Applying 151755-01 (389 of 392) ... success
Applying 152076-05 (390 of 392) ... success
Applying 152077-05 (391 of 392) ... success
Applying 152083-01 (392 of 392) ... success

Application of patches finished : 2016.02.25 20:33:25

Following patches were applied :
 119254-92     124939-05     147673-10     149112-01     150383-10
 138215-02     125215-05     147793-17     150400-30     150534-01
 148336-02     125719-56     147797-04     149173-04     150535-01
 125555-16     125725-03     147992-06     149175-09     150537-01
 118666-86     125731-12     148049-04     149279-04     150539-01
 ....<snip>
 121095-04     145080-15     148888-05     150180-02     151755-01
 122911-35     150510-03     149067-01     150307-01     152076-05
 123893-77     146288-03     149071-01     150310-02     152077-05
 123938-04     146582-05     149075-01     150312-06     152083-01

Following patches were skipped :
 Patches already applied
 120900-04     140796-01     141016-01     138766-01     145120-01
 121133-02     120011-14     139555-08     138852-01     145648-03
 119317-01     139520-02     142292-01     139289-02     147442-01
 121296-01     119903-02     141444-09     139615-01     147147-26
 146054-07     119963-24     142911-01     139962-02     147143-17
 142251-02     119966-01     142933-05     139980-01     146334-01
 118367-04     119986-03     142909-17     139986-01     146673-01
 118707-05     120101-01     144526-02     140912-01     146679-01
 ....<Snip>
 119313-42     124397-02     137115-01     143739-01     148625-01
 124188-03     124997-01     137147-07     144047-01     148870-01
 120099-08     125075-01     137282-01     144106-01     148948-01
 119546-08     125505-01     137871-02     144188-02     148975-01
 119648-03     125533-17     138096-02     144327-02     149108-01
 122640-05     125891-01     138181-01     147002-01     149149-01
 126897-02     126540-02     138245-01     144909-03     149163-01
 127755-01     127127-11     138647-01     145023-01     149165-01
 125503-02     138866-03     138649-01     147217-02     149483-01
 125547-02     137137-09
 Patches obsoleted by one or more patches already applied
 118712-23     118731-01     120753-09     139099-04     144455-01
 118718-06     124204-04     121308-20     139620-01     144492-01
 119117-52     122660-10     122470-03     140455-01     144569-01
 119246-39     119764-07     124171-07     141532-04     144911-02
 124628-10     119906-18     123630-03     141586-01     145096-03
 119252-29     119955-05     124457-02     142049-01     145929-05
 119278-38     120460-17     124630-42     142234-01     146954-03
 119315-19     119368-04     125279-05     143733-01     147194-03
 120199-15     120286-03     126365-16     143954-04     147378-01
 119534-29     120292-02     138247-01     144112-02     148135-01
 119538-19     120348-03     138361-01     144325-01     148165-02
 120272-31     120410-33     138854-01
 Patches not applicable to packages on the system
 118705-02     120414-27     121211-02     137004-09     143651-01
 118706-01     120811-09     121946-01     137090-02     143727-04
 118711-03     120812-32     122031-01     138195-04     144996-02
 121181-05     120815-01     122472-07     138824-12     145200-13
 119309-03     120849-04     123005-07     139291-02     147692-91
 119548-14     120928-32     123301-01     142244-02     147693-91
 120195-02     121104-11     125332-24     143317-03     151009-65
 120256-01     121136-02     125670-04     143527-01     151719-01
 120412-11
 Patches canceled due to prepatch termination
 150551-03

Installation of patch set to alternate boot environment complete.

Please remember to activate boot environment sol10_20151108 with luactivate(1M)
before rebooting.

Install log files written :
  /.alt.sol10_20151108/var/sadm/install_data/s10s_rec_patchset_short_2016.02.25_19.19.22.log
  /.alt.sol10_20151108/var/sadm/install_data/s10s_rec_patchset_verbose_2016.02.25_19.19.22.log
12. Activate the patched BE
 root@sol10-ldom:/root:# luactivate sol10_20151108

 A Live Upgrade Sync operation will be performed on startup of boot environment <sol10_20151108>.
 **********************************************************************
 The target boot environment has been activated. It will be used when you
 reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You
 MUST USE either the init or the shutdown command when you reboot. If you
 do not use either init or shutdown, the system will not boot using the
 target BE.
 **********************************************************************
 In case of a failure while booting to the target BE, the following process
 needs to be followed to fallback to the currently working boot environment:

 1. Enter the PROM monitor (ok prompt).

 2. Boot the machine to Single User mode using a different boot device
 (like the Solaris Install CD or Network). Examples:
     At the PROM monitor (ok prompt):
     For boot to Solaris CD:  boot cdrom -s
     For boot to network:     boot net -s

 3. Mount the Current boot environment root slice to some directory (like
 /mnt). You can use the following commands in sequence to mount the BE:
     zpool import rpool
     zfs inherit -r mountpoint rpool/ROOT/s10s_u11wos_24a
     zfs set mountpoint=<mountpointName> rpool/ROOT/s10s_u11wos_24a
     zfs mount rpool/ROOT/s10s_u11wos_24a

 4. Run <luactivate> utility with out any arguments from the Parent boot
 environment root slice, as shown below:
     <mountpointName>/sbin/luactivate

 5. luactivate, activates the previous working boot environment and
 indicates the result.

 6. umount /mnt

 7. zfs set mountpoint=/ rpool/ROOT/s10s_u11wos_24a

 8. Exit Single User mode and reboot the machine.
 **********************************************************************
 Modifying boot archive service
 Activation of boot environment <sol10_20151108> successful.

 root@sol10-ldom:/root:# lustatus
 Boot Environment           Is       Active Active    Can    Copy
 Name                       Complete Now    On Reboot Delete Status
 -------------------------- -------- ------ --------- ------ ----------
 sol10-build                yes      yes    no        no      -
 sol10-20151108             yes      no     yes       yes     -
13. Reboot the server
Use init 6 or shutdown -y -g0 -i6 (Follow the reboot instructions)

1 comment: