Keep in mind that this is something I wrote specific to the our environment, and I am sure each place is different, and each server is different in certain ways.
So, I recommend to use this procedure as a guide only but develop a procedure that is pertinent to your own case which I would do for every sever that I will be working on every time. I know it's a time-consuming process, but it's worth it end of the day. In this procedure, the current OS is Solaris 9, and that is being upgraded to Solaris 10 update 6. The OS disk is mirrored with Solaris volume manager.
Objective:
This documents discusses the plan to upgrade the OS from Solaris 9 to Solaris 10 update 6, and upgrade of Storage foundation to 5.0 MP3.
This is a HOW-TO document only. So, for any additional information, refer to the related Sun/Veritas documentation. Please feel free to contact me with any questions that you may have, I shall respond in a reasonable time frame.
Notes:
Do not follow these instructions if you need to upgrade just Storage foundation to 5.0 MP3.
First things to do:
Check the Sunsolve document ID 206844 (Live Upgrade software: Minimum Patch Requirements) to validate the patch requirements for the live upgrade.
No matter what version of Solaris your target system is running (Solaris 8, 9, or 10), always use the latest version of Solaris Live Upgrade software from the latest release of Solaris 10.
Identify and remove the LU packages currently installed on the target server.
bash-2.05# pkginfo|grep SUNWlu
application SUNWlur Live Upgrade (root)
application SUNWluu Live Upgrade (usr)
bash-2.05# pkgrm SUNWlur SUNWluu
bash-2.05# mount -F nfs ffeuscnuxut11:/depo/jump10_u6 /S10image
bash-2.05# cd /S10image/Solaris_10/Tools/Installers
bash-2.05# pwd
/image/Solaris_10/Tools/Installers
bash-2.05# ./liveupgrade20 –nodisplay
The above step will install the following packages
SUNWlucfg (New Live Upgrade packages from Solaris 10 8/07)SUNWlur
SUNWluu
After updating the Solaris Live Upgrade packages, you must patch the target with the patches listed in the infodoc. If the target system is running Solaris 9, select the patches from the Solaris 9/SPARC section and add them. After patching, you would then be ready to run Solaris Live Upgrade to upgrade the OS or patch your Solaris 9 system.
Always refer to the latest version of man pages at http://docs.sun.com, but not on the server.
Be sure to match the version of Solaris on the documents to the version of Solaris media that you used to load the Live Upgrade packages. Matching versions provides the correct set of supported features or options.
Do not proceed any further without completing the above tasks.
Preparing disk for the upgrade:
Stop the VEA server process, and remove the all the lock files.
# /etc/init.d/isisd stop
# rm /a/var/vx/isis/*lock
There are two 72 GiB disks mirrored on this server. So, the mirror will be split, and the detached disk will be used for the live upgrade. This requires clearing all the metadevice & metadb entries related to the 2nd disk.
# metadetach d30 d20
# metadetach d31 d21
# metadetach d33 d23
# metadetach d35 d25
# metadetach d36 d26
# metaclear d20 d21 d23 d25 d26
# metadb –d /dev/dsk/c1t1d0s7
If you need to change partition layout on the disk being used for the upgrade, make the necessary changes now. Make sure to leave 50 MiB free space on slice 7 for the metadb entries that will be added after the OS upgrade.
Creating a Boot Environment
You can create one or more boot environments and duplicate critical file systems from an active BE to the new BE. You can reorganize the disk layout if necessary and customize file systems.
You can create a boot environment on an unused partition on an existing hard drive or on a separate hard drive.
Part of creating a new BE involves copying critical file systems to another slice. You may need to prepare the disk before you create the new BE. Check the disk to make sure it is formatted properly.
· Identify slices large enough to hold the file systems to be copied. If these slices do not exist on the disk on which you intend to create the new boot environment, you must create them manually with the format command.
· Identify file systems that contain directories that you want to share among boot environments.
Warning: The slice must not be mounted or listed in the /etc/vfstab file.
**IMPORTANT** The alternate drive (ABE) must be partitioned properly before you run the lucreate command. In this case, you are copying your root filesystem to c1t1d0s0. The c1t1d0s0 slice must be large enough to accommodate the copy. When you are going from a flat file system to a multi partitioned filesystem and viceversa, the ABE must be formatted/partitioned with the appropriate slices and sizes defined.
Use the following steps to create a boot environment on free slices on the second disk.
1. Make a new /etc/vfstab with just the OS filesystems only. The lucreate command reads the /etc/vfstab tries to copy the files. If there are files/directories that need not be copied to the ABE, they need to excluded by listing in an excludelist file using –f option.
-f exclude_list_file
Use the contents of exclude_list_file to exclude specific files (including directories) from the newly created BE. exclude_list_file contains a list of files and directories, one per line. If a line item is a file, only that file is excluded; if a directory, that directory and all files beneath that directory, including subdirectories, are excluded.
Example command syntax for lucreate when you have multiple partitions.
This example uses /, swap, /var, /opt & /export:
Before running the lucreate command, please make sure that the /etc/vfstab file has just the filesystems that you’re using with lucreate command, everything else is part of the exclude_list_file.
bash-2.05# lucreate -c S9be -m /:/dev/dsk/c1t1d0s0:ufs -m -:/dev/dsk/c1t1d0s1:swap -m /var:/dev/dsk/c1t1d0s3:ufs -m /opt:/dev/dsk/c1t1d0s6:ufs -m /export:/dev/dsk/c1t1d0s5:ufs -n S10be –f /var/tmp/luexcludelist
Discovering physical storage devices
Discovering logical storage devices
Cross referencing storage devices with boot environment configurations
Determining types of file systems supported
Validating file system requests
Preparing logical storage devices
Preparing physical storage devices
Configuring physical storage devices
Configuring logical storage devices
Analyzing system configuration.
No name for current boot environment.
Current boot environment is named
Creating initial configuration for primary boot environment
The device is not a root device for any boot environment; cannot get BE ID.
PBE configuration successful: PBE name
Comparing source boot environment
system(s) you specified for the new boot environment. Determining which
file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Searching /dev for possible boot environment filesystem devices
Updating system configuration files.
The device is not a root device for any boot environment; cannot get BE ID.
Creating configuration for boot environment
Source boot environment is
Creating boot environment
Creating file systems on boot environment
Creating
Creating
Creating
Creating
Mounting file systems for boot environment
Calculating required sizes of file systems for boot environment
Populating file systems on boot environment
Checking selection integrity.
Integrity check OK.
Populating contents of mount point >.
Populating contents of mount point .
Populating contents of mount point .
Populating contents of mount point .
Copying.
Creating shared file system mount points.
Creating compare databases for boot environment
Creating compare database for file system .
Creating compare database for file system .
Creating compare database for file system .
Creating compare database for file system >.
Updating compare databases on boot environment
Making boot environment
Population of boot environment
Creation of boot environment
Once you see the Copying message , you can open another session to the server, and check the progress of lucreate by running df. You will see something as below. You can wait until you see compare message, and run another df. These filesystems will be unmounted once lucreate is done.
/dev/dsk/c1t1d0s0 23G 2.3G 20G 11% /.alt.tmp.b-5ye.mnt
/dev/dsk/c1t1d0s5 23G 1.2G 21G 6% /.alt.tmp.b-5ye.mnt/export
/dev/dsk/c1t1d0s6 51G 4.2G 46G 9% /.alt.tmp.b-5ye.mnt/opt
/dev/dsk/c1t1d0s3 23G 2.7G 20G 13% /.alt.tmp.b-5ye.mnt/var
swap 21G 0K 21G 0% /.alt.tmp.b-5ye.mnt/var/run
swap 21G 0K 21G 0% /.alt.tmp.b-5ye.mnt/tmp
You can verify the status by running the following command:
bash-2.05# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
S9be yes yes yes no -
S10be yes no no yes -
Upgrading the new Boot Environment
After you have created a BE, it remains unchanged until you are ready to upgrade it. You can upgrade the BE at any time. The upgrade does not affect any files in the active BE. Once you upgrade the new BE, activate the new BE and reboot the system. The Solaris 10 update 6 image is available on my jumpstart server, jss
# mkdir /S10image
# mkdir /S10profiles
# mount –F nfs jss:/depo/jump10 /S10image
# mount –F nfs jss:/depo/jumpstart /S10profiles
# luupgrade -u -n S10be -s /S10image –j /S10profiles/S10_luprof_db04 -l /var/tmp/lulog
218128 blocks
miniroot filesystem is
Mounting miniroot at
Validating the contents of the media .
The media is a standard Solaris media.
The media contains an operating system upgrade image.
The media contains
Constructing upgrade profile to use.
Locating the operating system upgrade program.
Checking for existence of previously scheduled Live Upgrade requests.
Creating upgrade profile for BE
Determining packages to install or upgrade for BE
Performing the operating system upgrade of the BE
CAUTION: Interrupting this process may leave the boot environment unstable
or unbootable.
Upgrading Solaris: 100% completed
Installation of the packages from this media is complete.
Updating package information on boot environment
Package information successfully updated on boot environment
Adding operating system patches to the BE
The operating system patch installation is complete.
INFORMATION: The file on boot
environment
INFORMATION: The file on boot
environment
INFORMATION: Review the files listed above. Remember that all of the files
are located on boot environment
environment
required or if additional media of the software distribution must be
installed.
The Solaris upgrade of the boot environment
Upgrading to Storage Foundation 5. 0 MP3 using Live upgrade
The upgrade of Storage foundation software includes removing older version packages, and installing the new version, configure as necessary.
1. Mount the ABE running the following command:
# lumount –n S10be /a
2. Run df to ensure all the ABE filesystems have been mounted.
3. Get a list of all the Veritas packages installed on the server.
# pkginfo|egrep “VRTS| SYMC” |awk ‘{ print $2 }’ > /var/tmp/vrtspkglist
4. Remove all the listed Veritas packages from the ABE. The following order is recommended.
# pkgrm -R /a VRTSvrdoc VRTSfsmnd VRTSfsdoc VRTSfssdk VRTSvmdoc VRTSfsman VRTSvmman
# pkgrm -R /a VRTSvrw VRTSweb VRTSjre15 VRTSjre
# pkgrm -R /a VRTSap VRTStep VRTSddlpr VRTSalloc VRTSvcsvr
# pkgrm -R /a VRTSvrpro VRTSfspro VRTSvmpro VRTSobgui VRTSob SYMClma
5. From the Storage foundation 5.0MP3 binaries, & run the Veritas installer pointing to the ABE.
# cd /mnt/Veritas/5.0MP3
# ./installer `hostname` –rootpath /a
This completes Storage foundation 5.0MP3 installation.
Switching from lpfc to Leadville driver
1. Since, we will use the Leadville driver to connect to the SAN in Solaris 10 and no longer requires the entries from the /kerne/drv/sd.conf file, and hence perform the necessary cleanup.
Remove lpfc binding entries from the /a/kerne/drv/sd.conf in the ABE. They look like this.
name="sd" parent="lpfc" target=48 lun=30 hba="lpfc1";
7. Remove the packages that are not needed in Solaris 10.
# pkgrm –R /a HBAnyware lpfc
Removing the lpfc package removes the lpfc.conf file also.
8. If not, move the file.
# mv /a/kernel/drv/lpfc.conf /a/kernel/drv/Sol9_lpfc.conf
9. Install the Leadville driver & admin package on the ABE.
# cd /var/spool/pkg
# tar xvf /mnt/san/emlxu_kit-1.02k-sparc.tar
# pkgadd –d . –R /a EMLXemlxu
10. Upgrade the Sun freeware packages & JASS:
Make a backup copy of the /a/usr/local/etc/sudoers file.
Remove the Solaris 9 version of Sun freeware & the JASS packages from the ABE.
# pkgrm –R /a SMClgcc346 SMCliconv SMCosl98d SMCpopt SMCrsync SMCsudo SMCtop SMCwget SUNWjass
11. Install the Solaris 10 version of the Sunfreeware packages & the JASS 4.2.0 package.
# cd /mnt/pkgs/sfw/Sol10
# pkgadd -R /a –d ./
# cd /mnt/pkgs
# pkgadd –R /a –d . SUNWjass
12. I customized the JASS driver to suit the server that I am working on. Copy the latest of JASS drivers to the ABE.
# cd /a/opt/SUNWjass/Drivers
# cp /mnt/sys_files/my* .
# chown root:root my*
# umount /mnt
13. Make a backup of the new sudoers file, and Copy the old sudoers file back to /a/usr/local/etc directory.
14. Create the directories that were part of the lucreate excludelist under /a.
15. Unmount the ABE filesystems.
# luumount -n S10be
During the down time:
Connect to the console first
Once you get the downtime, activate the ABE, and reboot using init command. Using reboot command will not update the EEPROM variable, and not boot from the ABE.
1. Precautionary measures :
a. Set the auto-boot? to false in eeprom.
c. Get a snapshot of the device paths for the current & new boot disks.
root:/-#> eeprom auto-boot?=false
root:/-#> echo|format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010cc7341,0
1. c1t1d0
/pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010ccad11,0
2. Activating the new Boot Environment
When the inactive BE is configured and upgraded, you can use the luactivate command to activate the upgraded BE.
root:/-#> luactivate S10be
A Live Upgrade Sync operation will be performed on startup of boot environment
WARNING: <1> packages failed to install properly on boot environment
INFORMATION: on boot
environment
install properly. Review the file before you reboot the system to
determine if any additional system maintenance is required.
**********************************************************************
The target boot environment has been activated. It will be used when you
reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You
MUST USE either the init or the shutdown command when you reboot. If you
do not use either init or shutdown, 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 disk:a
3. Boot to the original boot environment by typing:
boot
**********************************************************************
Modifying boot archive service
Activation of boot environment
3. Booting from upgraded Alternate Boot Environment(ABE):
Make sure you’re connected to the console. Do not proceed without having the console ready. There may be a time that you need to look at the messages, and take appropriate action in case of a problem.
After you have run the upgrade and activated the ABE, if you would like to boot from the just upgraded Alternate Boot Environment(ABE), just type init 6. This will automatically change your boot-device at the OBP level, create a new disk alias also, if needed, and update the files listed in /etc/lu/synclist after the reboot of the new BE.
Watch for the following messages on the console during the reboot process.
INIT: New run level: 6
The system is coming down. Please wait.
System services are now being stopped.
Live Upgrade: Deactivating current boot environment
Live Upgrade: Executing Stop procedures for boot environment
Live Upgrade: Current boot environment is
Live Upgrade: New boot environment will be
Live Upgrade: Activating boot environment
Live Upgrade: The boot device for boot environment
.
Live Upgrade: Activation of boot environment
The system is down.
syncing file systems... done
rebooting...
4. After the reboot, verify all the OS filesystems are mounted properly, and able to ping on active network interfaces.
5. To be able to use the Emulex HBAs with the Leadville driver, perform the following step. This requires rebooting the server.
bash-3.00# ./emlxdrv
EMLXDRV Driver Management Utility, Version: v1.00m
COPYRIGHT © 2004-2008 Emulex. All rights reserved.
Driver Alias Present Boot Sun Models
-------------------------------------------------------------------------------
emlxs lpfs no no no LP8000S and LP9002S (SBUS)
emlxs f800 no no no LP8000 and LP8000DC
emlxs f900 no no no LP9002, LP9002C, LP9002DC, and LP9402DC
emlxs f980 yes no no LP9802 and LP9802DC
emlxs fa00 no no no LP10000, LP10000DC and LP10000ExDC
emlxs fd00 no no no LP11000 and LP11002
emlxs fe00 no no no LPe11000,LPe11002 and LPe11004
emlxs f100 no no no LPe12000 and LPe12002
emlxs fe05 no no no LP21000 and LP21002
emlxs f0a5 no no no 2G Blade Adapter (emlxs only)
emlxs fc00 no no yes LP10000-S and LP10000DC-S (emlxs only)
emlxs fc10 no no yes LP11000-S and LP11002-S (emlxs only)
emlxs fc20 no no yes LPe11000-S and LPe11002-S (emlxs only)
emlxs fc40 no no yes LPe12000-S and LPe12002-S (emlxs only)
Available commands:
-------------------------------------------------------------------------------
set_emlxs
set_emlxs_sun - Sets emlxs driver to bind to all Sun devices
set_emlxs_all - Sets emlxs driver to bind to all devices
set_lpfc
set_lpfc_nonsun - Sets lpfc driver to bind to all non-Sun devices
clear_dev
clear_lpfc - Clears all lpfc driver bindings
clear_emlxs - Clears all emlxs driver bindings
clear_sun - Clears driver bindings to all Sun devices
clear_nonsun - Clears driver bindings to all non-Sun devices
clear_all - Clears driver bindings to all devices
q - Exits this program.
emlxdrv> set_emlxs_all
emlxdrv> q
The above step requires rebooting the server. But we can perform some other tasks before the reboot.
6. Delete the S9be.
# ludelete S9be
Determining the devices to be marked free.
Updating BE configuration database.
Updating compare database.
Updating compare database on other BEs.
Updating BE configuration database on all BEs.
Boot environment
7. Copy the home directories from Solaris 9 disk to the new one.
8. Delete the md entries that are related to the Solaris 9 disk, and clear the metadb.
# metaclear d30 d31 d33 d35 d36
# metaclear d10 d11 d13 d15 d16
# metadb –a –c 3 /dev/dsk/c1t1d0s7
# metadb –d /dev/dsk/c1t0d0s7
9. Setup the mirror on the boot disk.
# metainit –f d20 1 1 c1t1d0s0
# metainit –f d21 1 1 c1t1d0s1
# metainit –f d23 1 1 c1t1d0s3
# metainit –f d25 1 1 c1t1d0s5
# metainit –f d26 1 1 c1t1d0s6
# metainit d30 –m d20
# metainit d31 –m d21
# metainit d33 –m d23
# metainit d35 –m d25
# metainit d36 –m d26
# metaroot d30
10. Update the /etc/vfstab file to use the metadevices during the next reboot.
11. Apply the JASS driver to harden the system.
# /opt/SUNWjass/bin/jass-execute -d my-secure.driver -o /var/tmp/jass-output.txt
12. Update /etc/hosts.deny file to allow ssh login.
13. Make a copy of the /etc/shadow file.
14. Update the lastchg field to today’s value for all the active logins. Read the man page in case of doubt.
Do no touch the locked accounts, or the system will not function properly.
15. If ntp is not running, enable ntp
# svcs –a |grep ntp
# svcadm enable ntp
# svcadm disable wbem
16. Verify, and update the dump device.
17. Update the OBP firmware if necessary, and that reboots the server.
18. Once the system is rebooted, verify that all the OS filesystems have been mounted with the SVM metadevices.
19. Update the HBA firmware.
bash-3.00# cd /opt/EMLXemlxu/bin
bash-3.00# ./emlxadm
Use the download_fw
Type get_fw_rev to verify the new version.
Type hba to select the 2nd HBA, and repeat the steps.
Type q to exit the utility.
20. This requires rebooting the server, but do not reboot yet.
21. Configure the Storage foundation.
# cd /opt/VRTS/install
# ./installsf `hostame` -configure
During the configuration process, you should see the following messages. This ensures the proper functioning of the VEA.
Verify the install systems Fully Qualified Hostnames.
Configuring VEA in STANDALONE mode on "luserver" .......... ok
Configuring gridnode on " luserver" ........................ ok
Registering gridnode on " luserver" ........................ ok
Configuring actionagent on "luserver" ...................... ok
Registering actionagent on " luserver" ..................... ok
Registering StorageAgent on " luserver"......................ok
Registering DBEDAgent on " luserver" ....................... ok
Registering VAILAgent on " luserver" ....................... ok
Configuring Veritas Storage Foundation on luserver ......... Done
Do you want to start Veritas Storage Foundation processes now? [y,n,q] y
22. Verify that /etc/vx/volboot has the correct Veritas hostid. This can cause problem connecting to the VEA GUI. To fix
# vxdctl init
23. Make sure the VEA server components have started.
# ps -ef|grep pal root 5466 1 0 16:41:11 ? 0:08 /opt/VRTSobc/pal33/bin/vxpal -a StorageAgent -x
root 2350 1 0 15:01:48 ? 0:01 /opt/VRTSobc/pal33/bin/vxpal -a gridnode -x
root 2144 1 0 15:01:24 ? 0:04 /opt/VRTSobc/pal33/bin/vxpal -a VAILAgent -x
root 2385 1 0 15:01:59 ? 0:02 /opt/VRTSobc/pal33/bin/vxpal -a actionagent –x
24. If any of the vxpal Agents are not running they can be restarted as follows:
# /etc/init.d/vxpal.StorageAgent start
# /etc/init.d/vxpal.gridnode start
# /etc/init.d/vxpal.actionagent start
25. Add all the Veritas filesystem entries to /etc/vfstab.
26. Connect to the VEA GUI, and verify the storage components can be seen.
27. Check the NIC speed.
28. At this point, enable all the application startup/shutdown scripts.
29. Perform a final reboot on the server.
30. Verify that all the applications have been started.
31. Test filesystem backup.
32. Set auto-boot? to true.
Miscellaneous:
/etc/lutab is a file you can read to see what be's you have created.
# more /etc/lutab
1:be.orig:C:0
1:/:/dev/dsk/c1t0d0s0:1
2:be.new:C:0
2:/:/dev/dsk/c1t1d0s0:1
Each BE information is stored in ICF.x file in /etc/lu directory. When you delete a BE, the entries in /etc/lutab will be cleared, and the related ICF.x file will be removed as well.
No comments:
Post a Comment