BigAdmin System Administration Portal
Community Submitted Article
Print-friendly VersionPrint-friendly Version
This content is submitted by a BigAdmin user. It has not been reviewed for technical accuracy by Sun Microsystems, though it may have been lightly edited to improve readability. If you find an error or would like to comment on the article, please contact the submitter or use the comment field at the bottom of the article. Community submissions may not follow Sun trademark guidelines. For information on Sun trademarks, please see http://www.sun.com/suntrademarks/.
 
 

Using Solaris Live Upgrade Software and Upgrading VERITAS Volume Manager

Sivakanth Mundru, November, 2004

Contents:


Overview: Upgrading to the Solaris 9 OS and VERITAS Volume Manager 3.5

Upgrading from the Solaris 8 Operating System to the Solaris 9 release means upgrading the VERITAS Volume Manager from 3.1/3.1.1/3.2 to 3.5. This document outlines the steps for this upgrade using Solaris Live Upgrade software. Issues that I encountered are listed and explained here.

Solaris Live Upgrade is one of the nice features provided by the Solaris OS: It allows you to upgrade the OS on an alternate boot disk or sub-mirror while you have a system running on the primary boot disk or sub-mirror.

Abbreviations Used

PBE: Primary boot environment
ABE: Alternate boot environment


Preparatory Steps

Make sure that:

  • Your alternate boot disk is big enough for the Solaris 9 OS. I highly recommend that you do not use a 2-Gbyte boot disk. If you have one, this is the best time to go and purchase a bigger one.
  • None of the scripts that access your alternate boot disk will try to run during this process. (Example: home-grown scripts that pipe ufsdump to ufsrestore.)
  • You have the following packages installed:
  • SUNWadmap
    SUNWadmc
    SUNWlibC
    SUNWbzip
    
  • You apply the very latest recommended patch cluster on the system. This is very important; it would be the first question if you call for Sun support.

Using Solaris JumpStart software, create the JumpStart image for the Solaris 9 OS on any box that is running NFS.


Installing Solaris Live Upgrade Software Packages

Log into the system and become root.

# pkginfo -l SUNWlur SUNWluu (# Check whether Live Upgrade packages already exist)

If they exist, remove them using pkgrm:

# pkgrm SUNWluu SUNWlur

Install the packages from the target OS image.

# mount NFSserver:/jumpstart/OS/Solaris_9_2004-04 /mnt
# cd  /mnt/Solaris_9/Product
# pkgadd -d . SUNWlur SUNWluu
# umount /mnt

Removing the Alternate Boot Disk Slices From VERITAS Control

Solaris Live Upgrade software doesn't work with VERITAS Volume Manager.

You would have to remove the alternate boot disk from VERITAS control if you had set up a simple slice for rootdg.

Typical steps would involve:

# vxdg -g rootdg rmdisk c0t1d0s7   
# c0t1d0s7 is on alternate boot disk and type is sliced.

# vxprint -ht OR vxdisk list (Make sure that c0t1d0s7 is not a part of rootdg.)

If any of the swap devices come from the ABE, remove them.

# swap -l 

# swap -d /dev/dsk/c0t1d0s1

If your boot disk is encapsulated with VERITAS, remove your plexes coming from your submirror and unencapsulate your boot disk. This will require a system reboot as you have to boot with raw slices.

Once you are done upgrading the OS and VM on the submirror, you would need to encapsulate and mirror your disks.

Typical steps for unencapsulation would involve:

# vxplex -g rootdg -o rm dis plexname

# vxdg -g rootdg rmdisk diskname

# vxunroot (if all your slices are coming from one disk, else manual encapsulation)

# reboot 

Creating the Alternate Boot Environment

Execute the following:

# lucreate -c Solaris8 -m /:/dev/dsk/c0t1d0s0:ufs \
-m -:/dev/dsk/c0t1d0s1:swap -n Solaris9

In this command, you are telling lucreate to do the following:

  • Create a PBE/current boot environment and name it as Solaris8.
  • Create the ABE with the devices and type of file systems mentioned and name it as Solaris9.

(Note for lucreate: If you have to use the lucreate command a second time, please use it without the -c switch.)

# lucreate -m /:/dev/dsk/c0t1d0s0:ufs -m -:/dev/dsk/c0t1d0s1:swap -n Solaris9 

(For more information, read man page for lucreate.)

This will take some time (45 minutes to 1 hour) depending on the size of your root file system and the load on the box.

You can add as many file systems as you want on different slices. For example, you might want to keep /var on a different disk slice. Add one more parameter to the lucreate command. I keep it simple, as most of my boot disks are 36-Gbyte.

Issue Observed With lucreate

When lucreate is running, you might see something like this printed tons of times: Reading of /etc/group failed

Don't worry; just let lucreate complete. At the end, you will see that creation of boot environment <Solaris9> was successful.

Once you see the success message, you can compare the file on both boot environments manually using the following steps and can copy the original file in case of any discrepancy using the following procedure.

Note: You don't need to do this unless you get the above error or warning message.

# lumount Solaris9
# cd /.alt.Solaris9
# diff /etc/group /.alt.Solaris9/etc/group
# ls -l /etc/group /.alt.Solaris9/etc/group

If you see any differences, just copy the original file.

# cp -p /etc/group /.alt.Solaris9/etc/group
# cd

For more information, refer to Sun Product Documentation on docs.sun.com. Hit Ctrl-F and type the bug ID number: 4683186.

Unmount the ABE:

# luumount Solaris9

Commenting VERITAS Information on ABE Before Upgrade

Here's how to comment VERITAS from vfstab and system files:

# lumount Solaris9  

This will give you a mount point where the ABE is mounted, typically /.alt.BEName /.alt.Solaris9.

# cd /.alt.Solaris9/etc
# cp -p vfstab vfstab.vxfs
# sed '/vx\/dsk/s/^/#/g' vfstab.vxfs > vfstab
# cp system system.vxfs
# sed '/forceload:.*drv\/vx/s/^/*/' system.vxfs > system

(Both the above sed commands would copy the vfstab and system files and retain the copy in *.vxfs and comment out VERITAS information in the system and vfstab files.)


Deleting VERITAS Patches and Packages on ABE Before Upgrade

Here's how to uninstall VERITAS from the ABE.

The order of steps is important for the removal of VERITAS. We will try to remove everything in the reverse order of installation.

First, we will remove the patches installed for VERITAS on the host.

# showrev -p | egrep “112392|113203|113595|113596|113698” 

Remove the patches from the ABE using patchrm. (See the -R switch used for removing patches from the ABE, not the current BE. For more information, please read man pages for patchrm and pkgrm.)

#patchrm -R /.alt.Solaris9 patch#-rev#

Once all the patches are removed, remove VERITAS packages from the ABE.

Before you use the command pkgrm, make sure that you don't have these files:

/ABEmountpoint/var/vx/isis/vxisis.lock

If you have these files, remove them.

# rm  /var/vx/isis/vxisis.lock /.alt.Solaris9/var/vx/isis/vxisis.lock

The Solaris 8 OS and VXVM3.2 typically contain the following packages:

# pkginfo -l  -R /.alt.Solaris9 | grep VRTS
VRTSvmdoc, VRTSvrdoc, VRTSvmman, VRTSvmdev, VRTSvmsa,VRTSvras, VRTSvxvm, VRTSlic. 

Remove the packages depending on their interdependencies.

Issue Observed on a Host With Some Patches Missing

Example:

#pkgrm -R /.alt.Solaris9 VRTSvxvm  
****  Snip starts *****

The following package is currently installed: 
VRTSvxvm        VERITAS Volume Manager, Binaries
                (sparc) 3.1,REV=07.21.2000.07.59
Do you want to remove this package? y
## Removing installed package instance <VRTSvxvm>
This package contains scripts which will be executed with super-user 
permission during the process of removing this package.

Do you want to continue with the removal of this package [y,n,?,q] y
## Verifying package dependencies.
## Processing package information.
## Executing preremove script.

Checking for system volumes:
    swap    ... 
ERROR: The following volumes are still open:
FS_perf_data2 FS_pkgs FS_pkgs_weblogic81 FS_prod_pe FS_proddata_pe 

Please stop these volumes before removing this package. (can not stop ...)
pkgrm: ERROR: preremove script did not complete successfully

Removal of <VRTSvxvm> failed.
**** Snip Ends *****

More information is available on VERITAS incident #113279. A description can be found on SunSolve for Patch 113201.

(113279) pkgrm -R should not unload (local) vxvm modules. This is fixed by patch 113201-05, which has dependency patches as well. The same problem is also noticed in VERITAS Version 3.1 and 3.1.1.

No patch exists for those versions. In order to keep the primary boot disk out of risk and to have a standard procedure for three versions of VXVM, we will use the following procedure.

In this scenario (when pkgrm -R on VRTSvxvm fails), we will partially mimic what pkgrm does, by using the rm command.

# touch /.alt.Solaris9/etc/vx/reconfig.d/state.d/install-db
# rm /.alt.Solaris9/kernel/drv/vx*
# rm /.alt.Solaris9/kernel/drv/sparcv9/vx*
  

With this we have removed all VXVM-related stuff from the ABE's kernel and have suppressed VXVM startup on ABE.

We will remove all other startup scripts with pkgrm when we boot into single-user mode on ABE.


Staging the New VERITAS Packages on ABE and Optional Patch Cluster on PBE

Note: These steps can vary depending on your environment. I am copying the information from a utility server where I store my software.

# mount NFSserver:/export/Solaris/ /mnt
# lumount Solaris9
# cd /.alt.Solaris9/veritas
# cp -p /mnt/veritas/veritas35/veritas3.5big.tar.gz  .
# gunzip veritas3.5big.tar.gz  
# tar -xvf veritas3.5big.tar
# umount /mnt ; cd /
# mkdir /var/sol9patches
# mount NFSserver:/export/patches/ /mnt
# cd /mnt
# cp -p Solaris_9_11.tar.gz /var/sol9patches/
# cd /var/sol9patches
# gunzip Solaris_9_11.tar.gz ; tar -xvf Solaris_9_11.tar
# cd /
# luumount Solaris9

Upgrading Your ABE to the Solaris 9 OS

Execute the following:

# mkdir /Solaris9Image
# mount NFSserver:/jumpstart/OS/Solaris_9_2004-04  /Solaris9Image
# luupgrade -u -n Solaris9 -s /Solaris9Image

The preceding step will take some time to complete, depending upon the load on the machine.

# cd /var/sol9patches/Solaris_9_11/5.9;
# for i in `cat /var/sol9patches/Solaris_9_11/5.9/patch_order` <Enter>
  do <Enter> 
    patchadd -R /.alt.Solaris9 $i <Enter> \
# /.alt.Solaris9 is the mountpoint of ABE.
  done <Enter>

Once luupgrade and optional patching is over:

# luactivate Solaris9 (To activate the ABE)

You might see something like this if luactivate is not totally successful:

WARNING: <2> packages failed to install properly on boot environment <Solaris9>
INFORMATION: </var/sadm/system/data/upgrade_failed_pkgadds> on boot environment 
<Solaris9> contains a list of packages that failed to upgrade or install properly. 
Review the file before you reboot the system to determine if any additional 
system maintenance is required.
ERROR: <9> required packages are not installed on boot environment <Solaris9>.
INFORMATION: </var/sadm/system/data/packages_to_be_added> on boot environment 
<Solaris9> contains a list of required packages that are not installed. 
The boot environment is missing required packages. This might be the result of 
an upgrade operation that failed or that is incomplete. 
If the boot environment was upgraded using a multiple media distribution, 
for example the Solaris CD media, you must continue the upgrade process 
until it is fully completed. Failure to complete the upgrade process with 
all media of the software distribution makes the boot environment unstable.
ERROR: Unable to activate boot environment <Solaris9>. 
# Please review the corresponding files on the ABE and find whether there \
were some custom packages that failed to upgrade

Example: Your site might have a custom sendmail/SSH package that failed the upgrade.

Just re-add the corresponding packages once the Solaris 9 OS is activated.

A lot of GNOME packages might be listed in the above files as GNOME was not a part of the Solaris 8 OS, and it is a part of the Solaris 9 OS. If luactivate fails for the above reason, ignore it once you check the missing packages and change the boot-device value to alternate disk using EEPROM.

In case you do not get these messages from luactivate, you will see a message that the Solaris9 Boot environment is activated.

#lustatus will show up as active on reboot column "yes".


Installing VERITAS 3.5 on Your ABE
# reboot -- -s  

(Please note the -s switch. You should go into single user mode. Do not reboot directly.)

***** System is now running on alternate boot disk (c0t1d0s0) *****

# pkgrm VRTSvxvm

(No need for -R switch as we are already on altboot disk.)

This will remove any remnants of the pieces of the VXVM older version if you had to use the rm command manually.

# cd /veritas

a) Add VERITAS 3.5 packages and related patches (in altboot disk).

# ./installer 

Note: This will install the license package without prompts and then will ask you what to install on a MENU. Choose to install Volume Manager and its option 1.

Select 2 Install Menu. Then, select 1) Volume Manager. Install all packages.

# cd vpatch ;
# patchadd 112392-06 
# patchadd 113596-03

# reboot -- -s (for Volume Manager packages and patches to be available and take effect)

b) Create rootdg on the ABE.

c) Restore the original vfstab and system files.

# cp /etc/vfstab /etc/vfstab.beforereboot
# cp /etc/system /etc/system.beforereboot
# cp /etc/vfstab.vxfs /etc/vfstab
# cp /etc/system.vxfs /etc/system

d) Remove install-db and reboot.

# rm -f /etc/vx/reconfig.d/state.d/install-db
# init 6 / shutdown -i 6 -y -g 0

Note: You have to use either of the preceding two commands to have the Live Upgrade activation process completed. luactivate requires you to use init/shutdown. The system will come up with altboot disk.

e) Check diskgroups and volumes in case they are not imported and enabled properly.

Do vxdg list and check whether all the disk groups are imported. If not, import them.

Try to import the diskgroups you have noted before using this:

# vxdg import dgname; 

(If this doesn't work, use vxdg -C import dgname.)

You can try starting the volumes that are DISABLED by using:

# vxvol -f start volname

If you have many volumes to start, use the for loop:

# for i in `vxprint -ht | grep ^v | grep -v SYNC | awk '{print $2}'` <Enter> 
  do <Enter>
    vxvol -f start $i <Enter>
  done <Enter>

The licenses in /etc/vx directory from previous versions of VERITAS should work fine with 3.5. However, it is strongly recommended that you add a new 3.5 license.

 


The information and links on this page have been provided by a BigAdmin user. The submitter is solely responsible for such information and links. Sun is not responsible for the availability of external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. Sun will not be responsible or liable, directly or indirectly, for any actual or alleged damage or loss caused by or in connection with use of or reliance on the information posted here, or goods or services available on or through any external site or resource.


Rate and Review
Tell us what you think of the content of this page.
Excellent   Good   Fair   Poor  
Comments:
Your email address (no reply is possible without an address):
Sun Privacy Policy

Note: We are not able to respond to all submitted comments.
BigAdmin
  
 
 
 
Would you recommend this Sun site to a friend or colleague?
Contact About Sun News & Events Employment Site Map Privacy Terms of Use Trademarks Copyright Sun Microsystems, Inc.