How to patch the Solaris global zone with vxfs root local zones

In UNIX system administration, we may need to perform OS patching often.But we can;t give any Guarantee  that the server will come-up after the reboot.So prior to OS patching we need to make sure ,you have the valid back-out plan.If your global zone’s root filesystem is ZFS,then you have to choose live upgrade in order to perform OS patching.

This post will help you if your global zone’s root filesystem is ZFS and local zones are configured with vxfs.

High Level plan:
1. Halt the local zones & detach from global.
2. Comment in the index file
3. lucreate
4. Install the patches on the ALT BE . Same time take vxassist snapshot of all the zones root file system.
5. Activate ALT BE & reboot the global
6. Comment out in index file.
7 Attach the zones with -U option. (Make sure all the NFS FS are comment in zone’s vfstab).

Backout plan: If the zones are failed to attach.
1. Activate the OLD BE & reboot the global zone
2. Restore the vxassist snapshot for the local zones
3. Then perform the zoneadm attach with –U option.

Low level plan:
1.Login to global zone and Halt the zones

#zoneadm -z vzone1 halt
#zoneadm -z vzone2 halt
#zoneadm -z vzone3 halt

2.Detach the local zone from Global zone

#zoneadm -z vzone1 detach
#zoneadm -z vzone2 detach
#zoneadm -z vzone3 detach

3.Comment out the zones:

cd /etc/zones/
vi index
Before going to liveupgrade install the latest liveupgrade patches (74 is good one for SPARC)

4.check the existing boot environment 
[root@Global ~]# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
sol10up09 yes yes yes no
# lucreate -n NEW_BE
# lustatus
# lumount NEW_BE

5.Go to the ABE root path and edit index file if required.
Configured——————–change it to ———————-> installed

[root@ ~]# cat index

6.Come out from the ABE 

# cd /
# luumount NEW_BE
# ./installpatchset --apply-prereq --s10patchset
# ./installpatchset --s10patchset -B NEW_BE
# luactivate NEW_BE
7. Verify the current state. Here NEW_BE should be active on reboot 
  # lustatus
8.Reboot the server. (Do not use reboot command)
  # init 6
9. After reboot verify the currrent kernal version.
  # uname -a

Take the local zone snapshot before attaching to Global zone.
1.Take Sanpshot of zone’s root FS

# vxassist -g zone-root-vzone1 snapstart LVOL1
# vxassist -g zone-root-vzone2 snapstart LVOL1
# vxassist -g zone-root-vzone3 snapstart LVOL1

# vxassist -g zone-root-vzone1 snapshot LVOL1-SS
# vxassist -g zone-root-vzone2 snapshot LVOL1-SS
# vxassist -g zone-root-vzone3 snapshot LVOL1-SS

2.comment in all the NFS FS’s in zones’s vfstab .

3.Modify the index file and check the zoneadm list -cv (It should show the zones in configured state)Mount the NFS and comment out the vfstab entry for it.
#zoneadm -z vzone1 attach -U
#zoneadm -z vzone2 attach -U
#zoneadm -z vzone3 attach -U
#zoneadm -z vzone1 boot
#zoneadm -z vzone2 boot
#zoneadm -z vzone3 boot
==================Back Out Plan========================
Back-out Plan:
1.Halt the local zones
2.Detach the local zones
3.Activate the old BE
4.Restore the zone root’s snapshot
5.Attach the local zone to the global

Thank you for reading this article.

Please leave a comment if you have any doubt ,i will get back to you as soon as possible.