Home > Articles > Operating Systems, Server > Solaris

  • Print
  • + Share This
Like this article? We recommend

Implementing and Using Live Upgrade

To appreciate the value of using LU to upgrade a system, consider the common situation of having to upgrade a production server from the Solaris 7 OE to the Solaris 8 OE. Most likely, you could not take the server down to do the upgrade. Additionally, the site change control procedures likely require that you provide a back-out plan to restore the initial Solaris 7 OE in the case of any unforeseen upgrade failures or software incompatibilities. Using LU, you can complete this upgrade while the Solaris 7 OE is up and "live" while maintaining the Solaris 7 OE as a fallback in case failure during the upgrade procedure.

In the following example, the latest Solaris 7 OE recommended patch cluster and the LU2.0 packages are installed on napa; then, the system is upgraded. The following tasks outline the process required to upgrade a system using LU:

  1. Create and populate a new BE by cloning the current OE.

  2. Upgrade the new BE.

  3. Install (or upgrade) unbundled software, patching as necessary, in the new BE.

  4. When you are ready to cut over to the new version of the OE, activate the new BE and reboot into the new BE.

Rather than using slice 7 of the boot disk for the /export file system, use this slice for the clone OE or as an ABE.

The following example uses LU to upgrade a system from the Solaris 7 OE to the Solaris 8 10/01 OE. In this example, napa is being upgraded to the Solaris 8 OE; napa currently runs the Solaris 7 OE, booted off of /dev/dsk/c1t8d0s0; the Solaris 8 10/01 OE will be installed on /dev/dsk/c0t0d0s0.

When using the LU command line interface, you must use the Solaris OE format command to partition the disk for the new ABE before the lucreate command executes. In the following example, the c0t0d0 disk was partitioned prior to executing the following LU commands. However, if changes to the partitioning are needed, you can implement them through the Slice submenu in the lucreate command CUI.

For simplicity, this example upgrades napa using a locally mounted Solaris 8 10/01 CD-ROM. The use of LU, in conjunction with a JumpStart installation or Web Start Flash, will be detailed in Part 3 of this LU Sun BluePrints series. Additionally, consult the Solaris Live Upgrade 2.0 Guide (available at http://docs.sun.com) or the luupgrade man page for information about using Web Start Flash with LU.

Note that napa is not taken down or made unavailable to users or applications at any time during this procedure. The only downtime is the time required to shutdown and reboot napa when cutting over to the Solaris 8 OE.

Step 1: Creating and Populating a New Boot Environment

The following example creates a new BE named "Solaris7-0399" for the current Solaris 7 OE, and an ABE named "Solaris8-1001" for upgrading to the Solaris 8 10/01 OE. Note that the BE for the Solaris 8 OE is initially populated with a copy or "clone" of the BE for the Solaris 7 OE. You can schedule the copying of BEs during a time when the system is in a non-peak usage period.

napa# cat /etc/release
      Solaris 7 3/99 s998s_u1SunServer_10 SPARC
 Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
         Assembled 26 January 1999
napa# pkginfo |grep SUNWlu
application SUNWlur    Live Upgrade 2.0 10/01 (root)
application SUNWluu    Live Upgrade 2.0 10/01 (usr)
napa# lucreate -c "Solaris7-0399" \
> -m /:/dev/dsk/c0t0d0s0:ufs \
> -n "Solaris8-1001"
Please wait while your system configuration is determined.
Determining what file systems should be in the new BE.
Searching /dev for possible BE filesystem devices
Please wait while the configuration files are updated.
Please wait. Configuration validation in progress...
***************************************************************
Beginning process of creating Boot Environment <Solaris8-1001>.
No more user interaction is required until this process is complete.
***************************************************************
Setting BE <Solaris8-1001> state to Not Complete.
Creating file systems on BE <Solaris8-1001>.
Creating <ufs> file system on </dev/dsk/c0t0d0s0>.
/dev/rdsk/c0t0d0s0:   12584484 sectors in 4356 cylinders of 27 tracks, 107 sectors
    6144.8MB in 137 cyl groups (32 c/g, 45.14MB/g, 5632 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 92592, 185152, 277712, 370272, 462832, 555392, 647952, 740512, 
833072,
925632, 1018192, 1110752, 1203312, 1295872, 1388432, 1480992, 
 1573552,1666112, 1758672, 1851232, 1943792, 2036352, 2128912, 
 2221472, 2314032, 2406592, 2499152, 2591712, 2684272, 2776832, 
 2869392, 2958368, 3050928, 3143488, 3236048, 3328608, 3421168, 
 3513728, 3606288, 3698848, 3791408, 3883968, 3976528, 4069088, 
 4161648, 4254208, 4346768, 4439328, 4531888, 4624448, 4717008, 
 4809568, 4902128, 4994688, 5087248, 5179808, 5272368, 5364928, 
 5457488, 5550048, 5642608, 5735168, 5827728, 5916704, 6009264, 
 6101824, 6194384, 6286944, 6379504, 6472064, 6564624, 6657184, 
 6749744, 6842304, 6934864, 7027424, 7119984, 7212544, 7305104, 
 7397664, 7490224, 7582784, 7675344, 7767904, 7860464, 7953024,
 8045584, 8138144, 8230704, 8323264, 8415824, 8508384, 8600944, 
 8693504, 8786064, 8875040, 8967600, 9060160, 9152720, 9245280, 
 9337840, 9430400, 9522960, 9615520, 9708080, 9800640, 9893200, 
 9985760, 10078320, 10170880, 10263440, 10356000, 10448560, 
 10541120, 10633680, 10726240, 10818800, 10911360, 11003920, 
 11096480, 11189040, 11281600, 11374160, 11466720, 11559280, 
 11651840, 11744400, 11833376, 11925936, 12018496, 12111056, 
 12203616, 12296176, 12388736, 12481296, 12573856,
Mounting file systems for BE <Solaris8-1001>.
Calculating required sizes of file systems for BE <Solaris8-1001>.
Populating file systems on BE <Solaris8-1001>.
Copying file system contents to BE <Solaris8-1001>.
INFORMATION: Setting asynchronous flag on ABE <Solaris8-1001> mount point </.alt.3606/>
file system type <ufs>.
Copying of file system / directory </> is in progress...
Copying of file system / directory </> completed successfully.
Creating compare database for file system </>.
Updating compare database on other BEs.
Updating compare database on BE <Solaris8-1001>.
Compare databases updated on all BEs.
Making Boot Environment <Solaris8-1001> bootable.
Making the ABE bootable.
Updating ABE's /etc/vfstab file.
The update of the vfstab file on the ABE succeeded.
Updating ABE's /etc/mnttab file.
The update of the mnttab file on the ABE succeeded.
Updating ABE's /etc/dumpadm.conf file.
The update of the dumpadm.conf file on the ABE succeeded.
Updating partition ID tag on boot environment <Solaris8-1001> device 
</dev/rdsk/c0t0d0s2> to be root slice.
Updating boot loader for <SUNW,Ultra-60> on boot environment 
<Solaris8-1001> device </dev/dsk/c0t0d0s0> to match OS release.
Making the ABE <Solaris8-1001> bootable succeeded.
 Setting BE <Solaris8-1001> state to Complete.
Creation of Boot Environment <Solaris8-1001> successful.
Creation of Boot Environment <Solaris8-1001> successful.

The location of / for the Solaris8-1001 BE was specified by the -m option on the lucreate command. It is also important to note that the location of the primary swap device (in this case, /dev/dsk/c1t8d0s1) was not changed.

Step 2: Upgrading the Alternate Boot Environment

After creating and populating the ABE, it is upgraded as shown in the following example.

napa# luupgrade -u -n "Solaris8-1001" \
> -s /cdrom/sol_8_701_sparc/s0
Validating the contents of the media </cdrom/sol_8_701_sparc/s0>.
The media is a standard Solaris media.
The media contains an operating system upgrade image.
The media contains <Solaris> version <8>.
The media contains patches for the product.
Locating upgrade profile template to use.
Locating the operating system upgrade program.
Checking for existence of previously scheduled Live Upgrade requests.
Creating upgrade profile for BE <Solaris8-1001>.
Updating ABE's /etc/vfstab file.
The update of the vfstab file on the ABE succeeded.
Determining packages to install or upgrade for BE <Solaris8-1001>.
Performing the operating system upgrade of the BE <Solaris8-1001>.
CAUTION: Interrupting this process may leave the boot environment unstable or unbootable.
The operating system upgrade completed.
Adding operating system patches to the BE <Solaris8-1001>.
The operating system patch installation completed.
INFORMATION: </var/sadm/system/logs/upgrade_log> contains a log of the upgrade operation.
INFORMATION: </var/sadm/system/data/upgrade_cleanup> contains a log of cleanup 
operations required.
INFORMATION: Please review the above listed files on BE <Solaris8-1001> to determine 
if any additional cleanup work is required, or installers on additional volumes of the media 
being upgraded to need to be run, before activating the BE.
The Live Upgrade of the BE <Solaris8-1001> is completed.

Step 3: Adding Software and Patches to the Alternate Boot Environment

After upgrading the ABE, any necessary unbundled software or patches can be installed to the Solaris8-1001 BE. The -p and -P options of the luupgrade command can be used to add or remove, respectively, software packages to an ABE. The -t and -T options of the luupgrade command can be used to add or remove, respectively, patches to an ABE.

Consult the Solaris Live Upgrade 2.0 Guide (available at http://docs.sun.com) or the luupgrade man page for details about the usage of these options.

Step 4: Activating the New Solaris Operating Environment

After all of the other steps involved in upgrading the OE in the Solaris8-1001 ABE have been performed, the ABE is activated by rebooting at a convenient time as shown in the following example.

napa# luactivate "Solaris8-1001"
A Live Upgrade Sync operation will be performed on startup of boot environment <Solaris8-1001>.

***************************************************************

The target boot environment has been activated. It will be used 
when you reboot. NOTE: You must use either init or shutdown when 
you reboot. If you do not use one of these commands, 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. Change the boot device back to the original boot environment 
by typing:

  setenv boot-device rootdisk

3. Boot to the original boot environment by typing:

   boot

**************************************************************
Activation of boot environment <Solaris8-1001> successful.
napa# init 6
napa# 
INIT: New run level: 0
The system is coming down. Please wait.
System services are now being stopped.
Print services stopped.
Oct 2 15:35:02 napa syslogd: going down on signal 15
Live Upgrade: Deactivating current boot environment <Solaris7-0399>.
Live Upgrade: Executing Stop procedures for boot environment <Solaris7-0399>.
Live Upgrade: Current boot environment is <Solaris7-0399>.
Live Upgrade: New boot environment will be <Solaris8-1001>.
Live Upgrade: Activating boot environment <Solaris8-1001>.
Live Upgrade: Updating partition ID tag on boot environment 
<Solaris8-1001> device </dev/rdsk/c0t0d0s2> to be root slice.
fmthard: New volume table of contents now in place.
Live Upgrade: Updating boot loader for <SUNW,Ultra-60> on boot environment 
<Solaris8-1001> device </dev/rdsk/c0t0d0s0> to match OS release.
Live Upgrade: The boot device for boot environment <Solaris8-1001> will be </dev/dsk/c0t0d0s0>.
Live Upgrade: Changing primary boot device to boot environment 
<Solaris8-1001>.
Live Upgrade: The current boot environment <Solaris7-0399> 
boots from device <rootdisk rootmirror rootmirror2>.
Live Upgrade: The new boot environment <Solaris8-1001> boots 
from device <disk:a rootdisk>.
Live Upgrade: Activation of boot environment <Solaris8-1001> completed.
The system is down.

syncing file systems... done
Resetting ... 
screen not found.
Can't open input device.
Keyboard not present. Using ttya for input and output.

Sun Ultra 60 UPA/PCI (2 X UltraSPARC-II 450MHz), No Keyboard
OpenBoot 3.27, 2048 MB memory installed, Serial #13100131.
Ethernet address 8:0:20:c8:7:11, Host ID: 80c80711.

Initializing Memory
Boot device: disk:a File and args: 
SunOS Release 5.8 Version Generic_108528-11 64-bit
Copyright 1983-2001 Sun Microsystems, Inc. All rights reserved.
configuring IPv4 interfaces: hme0.
Hostname: napa
Configuring /dev and /devices
Configuring the /dev directory (compatibility devices)
The system is coming up. Please wait.
checking ufs filesystems
/dev/rdsk/c1t8d0s7: is clean.
Live Upgrade: Synchronizing new boot environment.
Live Upgrade: Previous boot environment was <Solaris7>.
Live Upgrade: Current boot environment is now <Solaris8-1001>.
Configuring network interface addresses: hme0.
starting rpc services: rpcbind done.
Setting netmask of hme0 to 255.255.255.0
Setting default IPv4 interface for multicast: add net 224.0/4: gateway napa
syslog service starting.
Print services started.
volume management starting.

The system is ready.

napa console login: root
Password: 
Last login: Tue Oct 2 14:01:40 on console
Oct 2 15:38:46 napa login: ROOT LOGIN /dev/console
Sun Microsystems Inc.  SunOS 5.8    Generic February 2000
napa# 
napa# cat /etc/release

Solaris 8 10/01 s28s_u6wos_08a SPARC Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. Assembled 12 September 2001


After the Solaris8-1001 BE was activated, init was used to shut the system down. To properly activate the BE, use only init or shutdown when switching between BEs. Note that the information provided at the completion of the luactivate command provides the procedure required to fallback to the original Solaris 7 OE image.

As previously mentioned, even though the Solaris8-1001 BE has been activated, the primary swap device (in this case, /dev/rdsk/c1t8d0s1) has not changed.

The luactivate command automatically performs synchronization between the new BE and the previous BE. This synchronization is usually needed only the first time a BE is activated. If you prefer to synchronize the BEs manually, specify the -s option to the luactivate command. Manual synchronization instructs that all files listed in /etc/lu/synclist are to be copied to the BE specified by the -n option of luactivate.

CAUTION

Manual synchronization of BEs (the -s option of the luactivate command) should be done with caution and should only be used between BEs that are the same version of Solaris OE.

To understand what can happen if you synchronize BEs on different versions of the Solaris OE, consider a system with two BEs; a S8 BE with the Solaris 8 OE installed and a S2.6 BE with the Solaris 2.6 OE installed. Because it is possible that the files listed for synchronization in /etc/lu/synclist may be specific to the Solaris 8 OE (for example, the files for configuring or implementing features found only in the Solaris 8 OE or later versions such as IPv6), these files may not function or may misconfigure the facilities of the Solaris 2.6 OE BE. As a result, if the S8 BE is active and manual synchonization is used, the S2.6 BE may encounter problems during boot or may be misconfigured upon completion of the boot process.

  • + Share This
  • 🔖 Save To Your Account