Using Live Upgrade 2.0 With a Logical Volume Manager
This article is the second of a three part series; this installment explains methods for using Live Upgrade (LU) 2.0 with a logical volume manager. Please see the first article in this series Managing Solaris_ Operating Environment Upgrades With Live Upgrade 2.0 for an introduction to the concepts and recommendations for using LU 2.0. The examples in this article use VERITAS Volume Manager (VxVM) software. However, the concepts and high-level procedural steps are the same for using LU 2.0 with Solaris Volume Manager software (also known as, Solstice DiskSuite_ software).
This article details the following:
LU and volume managers
Using LU with VxVM
Part 3 of this series will examine using LU with JumpStart_ technology and Web Start Flash.
Live Upgrade and Volume Managers
Live Upgrade (LU) is volume manager-aware; that is to say that LU is capable of working with boot disks managed by a logical volume manager (LVM). However, due to constraints imposed by VERITAS Volume Manager (VxVM) software and Solaris Volume Manager software, LU cannot directly assign a VxVM volume or an Solaris Volume Manager metadevice for the root file system of a new boot environment (BE). After a BE is activated and booted, you can mirror the boot disk using the appropriate procedure for mirroring the root disk with VxVM software or Solaris Volume Manager software.
VxVM software requires additional reboots during the boot disk encapsulation process. Similarly, Solaris Volume Manager software requires additional reboots when performing the root mirroring process. The use of LU with VxVM software or Solaris Volume Manager software does not add additional downtime or reboots to either of these processes.
Using Live Upgrade With a Logical Volume Manager
The following example presents the procedure you should use to upgrade a Solaris Operating Environment (Solaris OE) that has an LVM installed, using LU. In this example, rhone, a system running the Solaris 2.6 OE with Sun Enterprise Volume Manager_ 2.6 software, is upgraded to the Solaris 8 10/01 OE with VxVM 3.1.1 software.
Sun Enterprise Volume Manager 2.6 software was functionally equivalent to the VxVM 2.6 software. One of the fundamental differences between these products was that Sun Enterprise Volume Manager software package names were prefixed with SUNW, while VxVM software package names were prefixed with VRTS.
The latest Solaris 2.6 OE recommended patch cluster and the LU2.0 packages are installed on rhone; then, the system is upgraded. The following tasks outline the upgrade process using LU:
Create and populate a new BE by cloning the current OE.
Upgrade the new BE to the Solaris 8 OE 10/01.
Activate the new BE.
Remove Sun Enterprise Volume Manager 2.6 software and install VxVM 3.1.1 software, patching as necessary, in the new BE.
In this example, the Solaris 2.6 OE boot disk is c8t1d0s0; c0t0d0s0 will be used as the boot device for the Solaris 8 10/01 alternate boot environment (ABE). 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 character-based user interface (CUI) when lucreate is executed without any -m options.
For simplicity, in this example, we upgrade rhone using an nfs-mounted Solaris 8 10/01 OE media directory. You can also use LU in conjunction with a JumpStart installation or with Web Start Flash. The next LU article in this series will address methods for using LU with JumpStart technology. You can also consult the Solaris Live Upgrade 2.0 Guide (available at http://docs.sun.com) or the luupgrade man page for details.
There are several limitations when using LU 2.0 with current releases of VxVM software. Because the OBP boot device settings of the original BE become invalid after the VxVM software has been removed from the original BE, you may be unable to fall back to the original BE when using VxVM software with LU 2.0. If you need to perform a fall back to the original BE, manually change the OBP boot device settings with the eeprom command.
These limitations also include the order and method by which VxVM software packages are to be removed; these dependencies are noted in the following procedure. All of these limitations will be addressed in the LU 2.1 product, which will offer enhanced interoperability with all supported LVMs, including the VxVM-specific issues previously mentioned. Additionally, VERITAS Software has stated that the upcoming release of the VxVM software will be Live Upgrade "friendly."
The Sun Enterprise Volume Manager 2.6 package SUNWvxvm cannot be removed from an ABE while Sun Enterprise Volume Manager software is active and managing the boot disk in the active BE. This is because the Sun Enterprise Volume Manager 2.6 software preremove script, executed when the SUNWvxvm package is removed, only allows the package to be removed if the currently booted root disk is not under Sun Enterprise Volume Manager software control (that is, not encapsulated). It is this limitation that requires the activation, and subsequent reboot, in step 3. The use of Flash with Live Upgrade circumvents this restriction and allows step 3 to be skipped entirely. The details of this procedure will be presented in the third and final article in this LU series.
Step 1: Creating and Populating a New Boot EnvironmentThe following example creates a new BE named "Solaris2.6-5-98" for the current Solaris 2.6 OE, and an ABE named "Solaris8-10-01" to upgrade to the Solaris 8 10/01 OE. Note that the Solaris8-10-01 BE is initially populated with a copy or "clone" of the Solaris2.6-5-98 BE. You may schedule the copying of BEs during a time when the system is in a non-peak usage period. It is assumed that the current Solaris 2.6 OE recommended patch cluster and the LU 2.0 packages were installed prior to this step.
rhone# cat /etc/release Solaris 2.6 5/98 s297s_hw3smccServer_09 SPARC Copyright 1998 Sun Microsystems, Inc. All Rights Reserved. Assembled on 24 April 1998 rhone# pkginfo SUNWvmdev SUNWvmman SUNWvmsa SUNWvxva SUNWvxvm system SUNWvmdev Sun StorEdge Volume Manager, Header and Library Files system SUNWvmman Sun StorEdge Volume Manager, Manual Pages application SUNWvmsa Sun StorEdge Volume Manager, Server Administration system SUNWvxva Sun StorEdge Volume Manager, Visual Administrator system SUNWvxvm Sun StorEdge Volume Manager rhone# df -k Filesystem kbytes used avail capacity Mounted on /dev/vx/dsk/rootvol 6193583 280153 5851495 5% / /proc 0 0 0 0% /proc fd 0 0 0 0% /dev/fd /dev/vx/dsk/export 26749103 9 26481603 1% /export swap 3761584 248 3761336 1% /tmp rhone# lucreate -c "Solaris2.6-5-98" \ > -m /:/dev/dsk/c0t0d0s0:ufs \ > -m -:/dev/dsk/c0t0d0s1:swap \ > -m /export:/dev/dsk/c0t0d0s7:ufs \ > -n "Solaris8-10-01" 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-10-01>. No more user interaction is required until this process is complete. *************************************************************** Setting BE <Solaris8-10-01> state to Not Complete. Creating file systems on BE <Solaris8-10-01>. 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, ( newfs/mkfs output omitted for brevity ) 12573856, Mounting file systems for BE <Solaris8-10-01>. Calculating required sizes of file systems for BE <Solaris8-10-01>. Populating file systems on BE <Solaris8-10-01>. Copying file system contents to BE <Solaris8-10-01>. INFORMATION: Setting asynchronous flag on ABE <Solaris8-10-01> mount point </.alt.9975/> 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-10-01>. Compare databases updated on all BEs. INFORMATION: Disabling Veritas VxVM root mirroring on BE <Solaris8-10-01>. Making Boot Environment <Solaris8-10-01> 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-10-01> device </dev/rdsk/c0t0d0s2> to be root slice. Updating boot loader for <SUNW,Ultra-60> on boot environment <Solaris8-10-01> device </dev/dsk/c0t0d0s0> to match OS release. Making the ABE <Solaris8-10-01> bootable succeeded. Setting BE <Solaris8-10-01> state to Complete. Creation of Boot Environment <Solaris8-10-01> successful.
The location of /, /export and the partition to be used as primary swap for the Solaris8-10-01 BE were specified by the -m option(s) on the lucreate command.
Step 2: Upgrading the Alternate Boot Environment
After creating and populating the ABE, the vfstab and system files of the ABE are modified to remove the Sun Enterprise Volume Manager 2.6 software information. This is accomplished by mounting the file systems of the ABE, copying the pre-VxVM installation versions of these files, then editing the files as necessary to remove the VxVM references. The VxVM install-db file is then created; the presence of this file inhibits the start-up of VxVM in the ABE until the vxinstall procedure completes (successful completion of vxinstall removes the install-db file).
rhone# lumount Solaris8-10-01 /mnt /.alt.81001 rhone# cd /mnt/etc rhone# ls -la vfstab* -rw-rw-rw- 1 root root 495 Oct 18 11:58 vfstab -rw-r--r-- 1 root other 366 Oct 5 12:57 vfstab.prevm -rw-rw-rw- 1 root root 556 Oct 5 13:00 vfstab.sav rhone# cp vfstab vfstab.vxvm-2.6 rhone# cp vfstab.prevm vfstab rhone# vi vfstab rhone# cp system system.vxvm-2.6 rhone# vi system rhone# touch vx/reconfig.d/state.d/install-db rhone# cd / rhone# luumount Solaris8-10-01
The Solaris OE software in the ABE is then upgraded. The software is nfs-mounted from travigne, a JumpStart technology installation server.
rhone# luupgrade -u \ > -s /net/travigne/jumpstart/OS/Solaris_8_2001-10 \ > -n "Solaris8-10-01" Validating the contents of the media </net/travigne/jumpstart/ OS/Solaris_8_2001-10>. 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-10-01>. 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-10- 01>. Performing the operating system upgrade of the BE <Solaris8-10- 01>. 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-10-01>. 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-10-01> 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-10-01> is completed.
Step 3: Activating the New Solaris Operating Environment
After the luupgrade command completes, the Solaris8-10-01 ABE will have Solaris 8 OE 10/01 installed, with Sun Enterprise Volume Manager 2.6 software installed, but disabled. You can now remove all Sun Enterprise Volume Manager software packages except SUNWvxvm. To remove the packages, use the luupgrade command with the -P option, and use the -O '-n' option on luupgrade to specify that pkgrm is to be executed within the ABE in non-interactive mode. If any VxVM patches were installed, they must be removed (using the luupgrade -p command) before attempting to remove the VxVM software packages.
rhone# luupgrade -I -n Solaris8-10-01 \ > SUNWvmdev SUNWvmman SUNWvmsa SUNWvxva SUNWvxvm Mounting the BE <Solaris8-10-01>. Retrieving package information from the BE <Solaris8-10-01>. system SUNWvmdev Sun StorEdge Volume Manager, Header and Library Files system SUNWvmman Sun StorEdge Volume Manager, Manual Pages application SUNWvmsa Sun StorEdge Volume Manager, Server Administration system SUNWvxva Sun StorEdge Volume Manager, Visual Administrator system SUNWvxvm Sun StorEdge Volume Manager Unmounting the BE <Solaris8-10-01>. The package information from the BE <Solaris8-10-01> completed. rhone# luupgrade -P -n Solaris8-10-01 -O '-n'\ > SUNWvmdev SUNWvmman SUNWvmsa SUNWvxva Mounting the BE <Solaris8-10-01>. Removing packages from the BE <Solaris8-10-01>.
[remainder of command output removed for sake of brevity ]
The SUNWvxvm is not, and must not be, removed with the luupgrade -P command. This limitation is scheduled to be removed in an upcoming release of the VxVM software.
The ABE is activated by rebooting at a convenient time as shown in the following example.
rhone# lustatus BE_name Complete Active ActiveOnReboot CopyStatus ----------------------------------------------------------- Solaris2. 6-5-98 yes yes yes - Solaris 8-10-0 yes no no - rhone# luactivate Solaris8-10-01 *************************************************************** 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-10-01> successful. rhone# init 6
Step 4: Removing Sun Enterprise Volume Manager 2.6 Software and Installing VxVM 3.1.1
After the Solaris 8 10/01 OE is booted, upgrade to VxVM 3.1.1 by removing the Sun Enterprise Volume Manager 2.6 software SUNWvxvm package and then installing the VxVM 3.1.1 package.
After installing VxVM 3.1.1, run vxinstall to encapsulate the boot disk. Be certain to instruct vxinstall to ignore all other disks on all controllers attached to the system. After the boot disk has been mirrored, and the VxVM software has been started, VxVM will automatically detect all previous VxVM software-managed disks and will start the volumes.