Friday, October 22, 2010

Upgrading zones to match global machines patch level

The Global Zone and Non-Global Zones are on different patch levels. So to bring them both on the same patch level, the following steps can be followed.

If the zone is configured in cluster(VCS), stop all resources running in the SG through VCS including zone. Do not stop the zone root fs and DG. ( Halt the zone manually if necessary if some problem through VCS. eg) zoneadm -z zone04 halt)

Server1:/# zoneadm list -icv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   1 zone04           running    /zones/zone04                  native   shared
After the zone is down, put the zone in configured state (Normally VCS will put the zone in configured state automatically if it brings the zone down or by editing the /etc/zones/index file if the zone was halted manually)

Server1:/# zoneadm list -icv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   1 zone04     down       /zones/zone04                 native   shared


Server1:/# zoneadm list -icv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   - zone04     configured /zones/zone04                 native   shared

Server1:/# cat /etc/zones/index
# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)zones-index        1.2     04/04/01 SMI"
#
# DO NOT EDIT: this file is automatically generated by zoneadm(1M)
# and zonecfg(1M).  Any manual changes will be lost.
#
global:configured:/:

Don't offline the whole DG. Only stop the zone. Zoneroot should be mounted for attaching

Attach the zone

      zoneadm -z zone04 attach -u

      - While attaching if any package inconsistency error is thrown, remove the packages using pkgrm

Server1:/# zoneadm -z zone04 attach -u
/zones/zone04 must not be group readable.
/zones/zone04 must not be group executable.
/zones/zone04 must not be world readable.
/zones/zone04 must not be world executable.

Check if the zoneroot is mounted properly

Server1:/# ls -ld /zones/zone04
drwxr-xr-x   3 root     root         512 Mar 18  2010 /zones/zone04

Server1:/# df -k /zones/zone04
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d10      12396483 10032378 2240141    82%    /


Not mounted - So mount zoneroot properly (in this case the whole SG was brought down so both zone root fs and DG were stopped)

After mounting


Server1:/# ls -ld /zones/zone04
drwx------   5 root     root        1024 Mar 29  2010 /zones/zone04

Try attaching now.

Server1:/# zoneadm -z zone04 attach -u
zoneadm: zone 'zone04': ERROR: attempt to downgrade package SUNWlur, the source had patch 121430-43 but this system only has 121430-42

zoneadm: zone 'zone04': ERROR: attempt to downgrade package SUNWluu, the source had patch 121430-43 but this system only has 121430-42

So now we have to remove the two packages SUNWlur and SUNWluu.
After removing the package again attach

Server1:/# zoneadm -z zone04 attach -u
Getting the list of files to remove
Removing 1208 files
Remove 24 of 24 packages
Installing 23631 files
Add 415 of 415 packages
Installation of these packages generated warnings: SUNWgssc SUNWinstall-patch-utils-root SUNWkrbr SUNWmconr SUNWnisu SUNWntpr SUNWpkgcmdsr SUNWsacom SUNWwbcor VRTSjre15
Updating editable files
The file within the zone contains a log of the zone update.

Now boot the zone and bring up the resources

Server1:/#zoneadm -z zone04 boot

Verify the patch levels of both global and non-global zones

zone04:/root# uname -a
SunOS zone04 5.10 Generic_142900-02 sun4u sparc SUNW,Sun-Fire-15000
zone04:/root#
zone04:/root# cat /etc/release
                      Solaris 10 10/09 s10s_u8wos_08a SPARC
           Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 16 September 2009

Server1:/# uname -a
SunOS Server1 5.10 Generic_142900-02 sun4u sparc SUNW,Sun-Fire-15000
Server1:/# cat /etc/release
                      Solaris 10 10/09 s10s_u8wos_08a SPARC
           Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 16 September 2009

No comments:

Post a Comment