DBA > Articles

How to Perform Live Patching of Oracle Solaris 9

By: Joseph Gan
To read more DBA articles, visit http://dba.fyicenter.com/article/

Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before the patches can be installed. Applying a cluster patch, in particular, can take quite a while, especially if the machine is slow.

This technical tip describes how I used the Live Upgrade tools in the Oracle Solaris to successfully apply the latest patch cluster to a machine running Oracle Solaris 9 without bringing the machine into single-user mode.

Note: Although the information in this tip applies only to Oracle Solaris on SPARC systems, the procedure for Oracle Solaris on x86 systems is the same.

Contents:
* Preparation
* My Setup
* Procedure
* About the Author

Preparation
Before you can do live patching, you need an extra boot disk. I used an 18-GB disk for this test.

Also, the following necessary packages and patch revisions need to be installed on the system:
* Required packages for the Oracle Solaris 9 release:
o SUNWadmap
o SUNWlur
o SUNWluu
* Patches needed for Oracle Solaris 9 for SPARC platforms

My Setup
The machine I used had a 72-GB internal disk with Oracle Solaris 9 installed on it.

The current partition table on the 72-GB disk was:

Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c5t0d0s0 6559565 92604 6401366 2% /
/dev/dsk/c5t0d0s1 1988887 799593 1129628 42% /usr
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/dsk/c5t0d0s4 10086988 846725 9139394 9% /var
swap 7081544 32 7081512 1% /var/run
/dev/dsk/c5t0d0s5 20174761 5315024 14657990 27% /opt


I used another 18-GB disk for installing the new boot environment and patching.
The new partition table on the 18-GB disk was:
Current partition table (original):
Total disk cylinders available: 7506 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 217 501.57MB (218/0/0) 1027216
1 swap wu 218 - 869 1.46GB (652/0/0) 3072224
2 backup wm 0 - 7505 16.86GB (7506/0/0) 35368272
3 usr wm 870 - 1739 1.95GB (870/0/0) 4099440
4 var wm 1740 - 3565 4.10GB (1826/0/0) 8604112
5 home wm 3566 - 6956 7.62GB (3391/0/0) 15978392
6 home wm 6957 - 7499 1.22GB (543/0/0) 2558616
7 home wm 7500 - 7503 9.20MB (4/0/0) 18848

Procedure
Here are the steps required for this procedure.
1. Create a new boot environment as follows:

# lucreate -c s9old -n s9new -m /:c5t2d0s0:ufs -m -:c5t2d0s1:swap -m
/usr:c5t2d0s3:ufs -m /var:c5t2d0s4:ufs -m /opt:c5t2d0s5:ufs
#
I created /, /usr, /var, and /opt for the purpose of applying patches. However, if you want to boot from the new disk only, every file system on the current boot disk has to move across, like swap, in this case.

The creation of a new boot environment (s9new) was successful.
# Mount all file systems in the boot environment for applying patches:
# lumount s9new
The /, /usr, /var, and /opt directories will be mounted to the alternate mount points. You can confirm this from the output of the df -k command, as follows:

Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c5t0d0s0 6559565 92170 6401800 2% /
/dev/dsk/c5t0d0s1 1988887 799593 1129628 42% /usr
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/dsk/c5t0d0s4 10086988 846888 9139231
/dev/dsk/c5t0d0s5 20174761 5315024 14657990 27% /opt
/dev/dsk/c5t2d0s0 482455 91966 342244 22% /.alt.s8new
/dev/dsk/c5t2d0s3 1987399 799592 1128186 42% /.alt.s8new/usr
/dev/dsk/c5t2d0s4 4236302 837743 3356196 20% /.alt.s8new/var
/dev/dsk/c5t2d0s5 7866417 5315024 2472729 69% /.alt.s8new/opt


3. Now you are ready to apply the Oracle Solaris patch cluster that you have prepared. In this case, the patches are in the /var/tmp/patches directory.

Full article...


Other Related Articles

... to read more DBA articles, visit http://dba.fyicenter.com/article/