This document lists step to be followed when upgrading Veritas Storage Foundation (VxVm and VxFs) to 5.1 from a previous version. This will be a live document and will keep updating each time we do upgrade on different versions and flavours.
Please note that, in this document, server will be used as an example server and it’s configuration will be used in various steps. You may need to replace those with your servers.
Upgrade Steps in Summary
Here are the steps to be followed for the upgrade, each step will be explained in detail later in this document.
Take backup copy of configuration file by running in house scripts.
Run sort tool from http://sort.symantec.com on the server and generate a customised report for the server.
Check the server has met the pre requisites for upgrading to Veritas 5.1.
Do clean reboots from root disk as well as root mirror.
Make sure you have two plexes for each volume and each volume has one subdisk each from both the disks.
Take root mirror disk out of Veritas and convert in to slices.
Take root disk out of Veritas and convert in to slices.
Convert root disk in to SVM metas.
Upgrade Veritas to 4.1 MP2 if it is in a previous version.
Upgrade to Veritas 5.1 SP1.
Mirror rootmirror disk in to SVM root disk.
Upgrade Steps in Detail
5.1 Backup configuration files.
Before the upgrade starts, keep copy of the following configuration file outside the sever you are going to upgrade. Most of these you get from collect_info.ksh script.
#mkdir /var/crash/vxupgrade
#cd /var/crash/vxupgrade
#vxprint –Aht > vxprint_all
#vxprint –htg rootdg > vxprint_rootdg
#vxdg list > vxdg_list #vxdisk –e list > vxdisk_list
#df –k > df_k #cp /etc/llttab llttab
#cp /etc/gabtab gabtab
#prtvtoc /dev/rdsk/(rootdisk)s2 > prtvtoc_rootdisk
#prtvtoc /dev/rdsk/(mirror_disk)s2 > prtvtoc_mirrordisk
#ls –al /dev/dsk|grep <root disk> > root_disk_path
#ls –al /dev/dsk|grep <mirror disk> mirror_disk_path
#cp /etc/vfstab vfstab
#tar –cvf config_before.tar *
Copy this tar file somewhere outside safe.
5.2 Run SORT Tool And Crate A Customised Report.
Symantec SORT tool can be downloaded from http://sort.symantec.com and can be installed on your server. Copy the software
#cd /data/patching
#scp sort_sol_sparc.sh <hostname>:/var/crash
On client
#cd /var/crash
#./ sort_sol_sparc.sh
This is a self-guiding script, it will ask you few questions, you answer as appropriate. At the end, it will generate 3 xml files and 3 txt files under this directory as follows.
root:#/var/crash/sort/reports
# pwd
/var/crash/sort/reports
root:#:/var/crash/sort/reports
# ls -al
total 21478
drwxr-xr-x 2 root root 512 Jun 14 12:51 .
drwxr-xr-x 6 root root 512 Jun 14 12:29 ..
-rw-r--r-- 1 root root 4760 Jun 14 12:29 <hostname>_IAS_20120614_122931.txt
-rw-r--r-- 1 root root 36857 Jun 14 12:29 <hostname>_IAS_20120614_122931.xml
-rw-r--r-- 1 root root 709 Jun 14 12:29 <hostname>_PDR_20120614_122945.txt
-rw-r--r-- 1 root root 23150 Jun 14 12:29 <hostname>_PDR_20120614_122945.xml
-rw-r--r-- 1 root root 2863104 Jun 14 12:35 <hostname>_PDR_20120614_122945_sanitized.xls -rw-r--r-- 1 root root 106584 Jun 14 12:29 <hostname>_RA_20120614_122934.txt
-rw-r--r-- 1 root root 125754 Jun 14 12:29 <hostname>_RA_20120614_122934.xml
You upload these xml file in to http://sort.symantec.com -> Install and upgrade -> Installation and Upgrade Custom Reports -> upload report, tab.
Once you upload these xml reports, you get 3 reports back in PDF format and also in HTML. They are
Installation and upgrade Report License/Deployment Report Risk Assessment Report
These reports will tell you if you have any show stoppers or any problems you may need to mitigate before an upgrade.
5.3 Pre-requisite to go to VXVM 5.1 SP1.
Although you have got SORT reports, these are important pre-requisits you should be aware.
Existing veritas disk groups should be at layout version 6 or above, you can find this by fstyp –v <filesystem special file>
If veritas version is below SF 4.1 MP2 and want to go to MP2 first, you need this solaris patch or above, 119254-09.
To go to Veritas SF 5.1, you need to have minimum 4.1 MP2.
On your rootdg, you should have two disks mirrored each other to follow the procedure listed in this document.
On your rootdg, you should have two plexes for each volume.
On your rootdg, each plex should only have one subdisks each, else you will have trouble in slicing the disks.
5.4 Do clean reboots from both mirror and root disks.
As we are going to keep mirror disk for regression purpose and will be upgrading on root disk, you should make sure eeprom alias for rootdisk and rootmirror are correct. If they are wrong, please correct it now.
#init 0
Ok>boot mirror (Once booted, check all OK, then)
#init 6
Now both disks are tested and you are back on root disk.
5.5 Check rootdg config is equipped for this upgrade process.
It should have two plexes for each volume and one subdisk each on each plex from different disks, as hown below.
root:#:/root
# vxprint -htg rootdg
DG NAME NCONFIG NLOG MINORS GROUP-ID ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK CO NAME CACHEVOL KSTATE STATE VT NAME NVOLUME KSTATE STATE V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE DC NAME PARENTVOL LOGVOL SP NAME SNAPVOL DCO dg rootdg default default 93000 1180090659.6. dm rootdisk Disk_0 auto 5777 71121402 - dm rootmirror Disk_1 auto 2632 71121402 - v crash - ENABLED ACTIVE 8389656 ROUND - fsgen pl crash-01 crash ENABLED ACTIVE 8389656 CONCAT - RW sd rootdisk-03 crash-01 rootdisk 58730480 8389656 0 Disk_0 ENA pl crash-02 crash ENABLED ACTIVE 8389656 CONCAT - RW sd rootmirror-05 crash-02 rootmirror 58727592 8389656 0 Disk_1 ENA v home - ENABLED ACTIVE 2097152 SELECT - fsgen pl home-01 home ENABLED ACTIVE 2097414 CONCAT - RW sd rootdisk-06 home-01 rootdisk 67120136 2097414 0 Disk_0 ENA pl home-02 home ENABLED ACTIVE 2097414 CONCAT - RW sd rootmirror-06 home-02 rootmirror 67117248 2097414 0 Disk_1 ENA v opt - ENABLED ACTIVE 16779312 ROUND - fsgen pl opt-01 opt ENABLED ACTIVE 16779312 CONCAT - RW sd rootdisk-05 opt-01 rootdisk 25171856 16779312 0 Disk_0 ENA pl opt-02 opt ENABLED ACTIVE 16779312 CONCAT - RW sd rootmirror-03 opt-02 rootmirror 25168968 16779312 0 Disk_1 ENA v rootvol - ENABLED ACTIVE 16779312 ROUND - root pl rootvol-01 rootvol ENABLED ACTIVE 16779312 CONCAT - RW sd rootdisk-02 rootvol-01 rootdisk 8392544 16779312 0 Disk_0 ENA pl rootvol-02 rootvol ENABLED ACTIVE 16779312 CONCAT - RW sd rootmirror-02 rootvol-02 rootmirror 8389656 16779312 0 Disk_1 ENA v swapvol - ENABLED ACTIVE 8389656 ROUND - swap pl swapvol-01 swapvol ENABLED ACTIVE 8389656 CONCAT - RW sd rootdisk-01 swapvol-01 rootdisk 2888 8389656 0 Disk_0 ENA pl swapvol-02 swapvol ENABLED ACTIVE 8389656 CONCAT - RW sd rootmirror-01 swapvol-02 rootmirror 0 8389656 0 Disk_1 ENA v var - ENABLED ACTIVE 16779312 ROUND - fsgen pl var-01 var ENABLED ACTIVE 16779312 CONCAT - RW sd rootdisk-04 var-01 rootdisk 41951168 16779312 0 Disk_0 ENA pl var-02 var ENABLED ACTIVE 16779312 CONCAT - RW sd rootmirror-04 var-02 rootmirror 41948280 16779312 0 Disk_1 ENA
5.6 Take Root mirror disk out of Veritas and convert to slices. You can see the encapsulated volumes in /etc/vfstab as commented. For eg.
#NOTE: volume rootvol () encapsulated partition c0t0d0s0
#NOTE: volume swapvol () encapsulated partition c0t0d0s1
#NOTE: volume opt () encapsulated partition c0t0d0s5
#NOTE: volume var () encapsulated partition c0t0d0s6
#NOTE: volume crash () encapsulated partition c0t0d0s7
If this is not available, this can be seen in /etc/vfstab.prevm as well. Run below to install boot track on the disk and also define the boot partitions in the disk’s VTOC.
#/usr/lib/vxvm/bin/vxbootsetup -g rootdg rootmirror
#prtvtoc /dev/rdsk/<mirror disk>s2
If you have partitions defined for all those encapuslated volume, then it’s fine. Else you need to create them manually by using vxmksdpart command.
Usage : vxmksdpart <subdisk name> <slice number> <tag> <flag>
What should be tag & flag.
Tag Description flag Description
0x00 UNASSIGNED 0x00 MOUNTABLE
0x01 BOOT 0x01 UNMOUNTABLE
0x02 ROOT 0x10 READ-ONLY
0x03 SWAP
0x04 USR
0x05 BACKUP
0x06 STAND
0x07 VAR
0x00 HOME
0x14 Public VxVM
0x15 Private VxVM
For eg.
To recreate the slice for crash on the above example,
#/etc/vx/bin/vxmksdpart rootmirror-05 7 0x00 0x00
If you have more volumes created under Veritas after disk was encapsulated, for eg. /opt/oracle , etc, then you may need to backup that data. If you have more than 5 volumes in rootdg, then the 6th one will be lost during this process. So, you need to back them up.
Disassociate all mirror plexes from volumes. For eg.
root:# vxplex -g rootdg dis home-02
root::/root # vxplex -g rootdg dis opt-02
root::/root # vxplex -g rootdg dis rootvol-02
root::/root # vxplex -g rootdg dis swapvol-02
root::/root # vxplex -g rootdg dis var-02
Now remove plexes from mirror disk
root::/root # vxedit -g rootdg -r rm crash-02
root::/root # vxedit -g rootdg -r rm home-02
root::/root # vxedit -g rootdg -r rm opt-02
root::/root # vxedit -g rootdg -r rm rootvol-02
root::/root # vxedit -g rootdg -r rm swapvol-02
root::/root # vxedit -g rootdg -r rm var-02
root::/root # vxdg -g rootdg rmdisk rootmirror
Fsck the slice volumes in mirror disk.
root::/root # fsck -y /dev/rdsk/c1t1d0s0
root::/root # fsck -y /dev/rdsk/c1t1d0s6
etc
root::/root # mount /dev/dsk/c1t1d0s0 /mnt
root::/root # cd /mnt/etc
root::/mnt/etc # cp -p system system_20062012
root::/mnt/etc # cp -p vfstab vfstab_20062012
#vi /mnt/etc/vfstab (Change Veritas entries to slices), as flike below
/dev/dsk/c1t1d0s1 - - swap - no -
/dev/dsk/c1t1d0s0 /dev/rdsk/c3t1d0s0 / ufs 1 no logging
/dev/dsk/c1t1d0s3 /dev/rdsk/c3t1d0s3 /var ufs 1 no logging
/dev/dsk/c1t1d0s6 /dev/rdsk/c3t1d0s6 /var/crash ufs
#vi /mnt/etc/system (comment the following entries)
Rootdev
Set vxio
root::/mnt/etc # touch /mnt/etc/vx/reconfig.d/state.d/install-db
root::/mnt/etc # rm /mnt/etc/vx/reconfig.d/state.d/ root-done
Remove tag 14 and 15 partitions from mirror disk, they are private and public region.
Format->select mirror disk and remove those 2 partitions and label the disk.
root::/root # umount /mnt
#sync
#sync
#init 0
Ok>boot rootmirror
System should now boot via Slices.This disk is now for regression purpose, we are going to leave this as it is. Once happy, boot via bootdisk again.
#init 6
System should now come back up via root disk and with rootdg in it.
5.7 Take Root disk out of Veritas and convert to slices.
Run below command to unencapsulate the disk partitions. This command will fail if you have more than 5 volumes in rootdg. If there additional volumes created after initial disk encapsulation, you need to backup data and remove that volume first.
root::/root/CRQ # vxunroot
/etc/vx/bin/vxunroot: Error: Disk contains more than 5 volumes which cannot be unencapsulated. Move some volumes to different disk and try again Remove the 6th volume and try again.
root::/root # vxunroot
VxVM vxunroot NOTICE V-5-2-1564
This operation will convert the following file systems from volumes to regular partitions:
crash opt rootvol swapvol var
VxVM vxunroot INFO V-5-2-2011
Replacing volumes in root disk to partitions will require a system reboot. If you choose to continue with this operation, system configuration will be updated to discontinue use of the volume manager for your root and swap devices.
Do you wish to do this now [y,n,q,?] (default: y)
VxVM vxunroot INFO V-5-2-287 Restoring kernel configuration...
VxVM vxunroot INFO V-5-2-78
A shutdown is now required to install the new kernel.
You can choose to shutdown now, or you can shutdown later, at your convenience.
Do you wish to shutdown now [y,n,q,?] (default: n)
VxVM vxunroot INFO V-5-2-258
Please shutdown before you perform any additional volume manager or disk reconfiguration. To shutdown your system cd to / and type
shutdown -g0 -y -i6
Now reboot server.
#sync
#sync
#shutdown –g0 –y –i6
When the system comes back up, it will be mounted on slices.
5.8 Convert Root Disk In To SVM Metas.
Remove tag 14 and tag 15 partitions from root disk, they are public and private region for Veritas and we don’t need them anymore.
Format->root disk, select public and private regions and change the size to 0 and label it.
Create a small partition; say 20mb on root disk for SVM database, metadb, use format command. Better to use recently removed public/private region partition for the same.
#format -> select disk -> select partition and create it, label it
root::/root # metadb -a -f -c 3 c1t0d0s4
root::/root # metadb -a -f -c 3 c1t0d0s4
root::/root # metainit -f d11 1 1 c1t0d0s0 d11: Concat/Stripe is setup
root::/root # metainit d10 -m d11 d10: Mirror is setup
root::/root # metaroot d10
root::/root # metainit -f d1 1 1 c1t0d0s1 d1: Concat/Stripe is setup
root::/root # metainit d0 -m d1 d0: Mirror is setup
root::/root # metainit -f d51 1 1 c1t0d0s5 d51: Concat/Stripe is setup
root::/root # metainit d50 -m d51 d50: Mirror is setup
root::/root # metainit -f d61 1 1 c1t0d0s6 d61: Concat/Stripe is setup
root::/root # metainit d60 -m d61 d60: Mirror is setup
root::/root # metainit -f d71 1 1 c1t0d0s7 d71: Concat/Stripe is setup
root::/root # metainit d70 -m d71 d70: Mirror is setup
edit /etcvfstab and change entries to disk suite instead of slices. Also comment all nonroot Veritas volumes in vfstab, so they won’t get mounted when we reboot. So, it should look like this now,
/dev/md/dsk/d0 - - swap - no -
/dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no logging
/dev/md/dsk/d60 /dev/md/rdsk/d60 /var ufs 1 no logging,nosuid
/dev/md/dsk/d50 /dev/md/rdsk/d50 /opt ufs 2 yes logging
/dev/md/dsk/d70 /dev/md/rdsk/d70 /var/crash ufs
Change dump device to point to SVM meta instead of slice.
root::/etc # dumpadm
Dump content: kernel pages
Dump device: /dev/dsk/c1t0d0s1 (swap)
Savecore directory: /var/crash/
Savecore enabled: yes Save compressed: on
Change this to point to current SVM meta device for swap.
root::/root # dumpadm -d /dev/md/dsk/d0
If you had lost any volumes during unencapsulation process, then you need to create it now and restore it.If you had only one volume lost, you can create that slice partition first by using format and then create meta on it. If you had more than one volumes lost, you may need to create soft partitions.
In this example, we only had /homevol lost and we do have one free partition left.
#format
Select the current root disk Select partition 3 and create partition with remaining space.
In this case c1t0d0s3
#metainit –f d31 1 1 c1t0d0s3
#metainit d30 –m d31
#newfs /dev/md/rdsk/d30
#vi /etc/vfstab (Change the mount device accordingly)
#mountall Restore data from which ever method you backed up.
#init 6 (Make sure it is now booting via disk suite and all looks ok)
5.9 Upgrade Veritas 4.1 MP2.
Copy the software to your server.
#cd /data/patching/Veritas
#scp VRTS_4.1_MP2_sol.tar.gz clent:/var/crash
On Client
#cd /var/crash #gunzip VRTS_4.1_MP2_sol.tar.gz
#tar –xvf VRTS_4.1_MP2_sol.tar
#./ install_vp Type the server name when it asks and then it will take you through.
#init 6 root::/var/crash/MP2
# pkginfo -l VRTSvxvm
PKGINST: VRTSvxvm
NAME: VERITAS Volume Manager, Binaries
CATEGORY: system
ARCH: sparc VERSION: 4.1,REV=02.17.2005.21.28
BASEDIR: /
VENDOR: VERITAS Software
DESC: Virtual Disk Subsystem
PSTAMP: VERITAS-4.1MP2.14:2007-02-21
INSTDATE: Aug 22 2007 12:43
HOTLINE: 800-342-0652
EMAIL: support@veritas.com STATUS: completely installed
FILES: 845 installed pathnames 31 shared pathnames 18 linked files 98 directories 410 executables 300751 blocks used (approx) Now install new license.
#vxlicinst –k <license key>
5.10 Upgrade Veritas version to 5.1 SP1. Copy the software Login to uppsala2
#cd /data/patching/Veritas
#scp VRTS_SF_HA_Solutions_5.1_SP1_Solaris_SPARC.tar.gz :/var/crash On
#cd /var/crash
#gunzip VRTS_SF_HA_Solutions_5.1_SP1_Solaris_SPARC.tar.gz
#tar –xvf VRTS_SF_HA_Solutions_5.1_SP1_Solaris_SPARC.tar
# cd dvd1-sol_sparc
#./ installer Type server name when asked. Type “G” for upgrade when asked. Do a reboot finally
#init 6
5.11 Attach Mirror Back To SDS/SVM.
This step should only be done after you got confirmation from user that everything is OK and no regression needed.
#prtvtoc /dev/rdsk/<current root disk>s2 | fmthard –s - /dev/rdsk/<mirror disk>s2
# metadb -a -f -c 3 c1t1d0s4
#metainit –f d12 1 1 c1t1d0s0
#metainit –f d2 1 1 c1t1d0s1
#metainit –f d32 1 1 c1t1d0s3
#metainit –f d52 1 1 c1t1d0s5
#metainit –f 62 1 1 c1t1d0s6
#metainit –f d72 1 1 c1t1d0s7
#metattach d10 d12
#metattach d0 d2
#metattach d30 d32
#metattach d50 d52
#metattach d60 d62
#metattach d70 d72
#metastat (Check all volumes are mirrored)
Please note that, in this document, server will be used as an example server and it’s configuration will be used in various steps. You may need to replace those with your servers.
Upgrade Steps in Summary
Here are the steps to be followed for the upgrade, each step will be explained in detail later in this document.
Take backup copy of configuration file by running in house scripts.
Run sort tool from http://sort.symantec.com on the server and generate a customised report for the server.
Check the server has met the pre requisites for upgrading to Veritas 5.1.
Do clean reboots from root disk as well as root mirror.
Make sure you have two plexes for each volume and each volume has one subdisk each from both the disks.
Take root mirror disk out of Veritas and convert in to slices.
Take root disk out of Veritas and convert in to slices.
Convert root disk in to SVM metas.
Upgrade Veritas to 4.1 MP2 if it is in a previous version.
Upgrade to Veritas 5.1 SP1.
Mirror rootmirror disk in to SVM root disk.
Upgrade Steps in Detail
5.1 Backup configuration files.
Before the upgrade starts, keep copy of the following configuration file outside the sever you are going to upgrade. Most of these you get from collect_info.ksh script.
#mkdir /var/crash/vxupgrade
#cd /var/crash/vxupgrade
#vxprint –Aht > vxprint_all
#vxprint –htg rootdg > vxprint_rootdg
#vxdg list > vxdg_list #vxdisk –e list > vxdisk_list
#df –k > df_k #cp /etc/llttab llttab
#cp /etc/gabtab gabtab
#prtvtoc /dev/rdsk/(rootdisk)s2 > prtvtoc_rootdisk
#prtvtoc /dev/rdsk/(mirror_disk)s2 > prtvtoc_mirrordisk
#ls –al /dev/dsk|grep <root disk> > root_disk_path
#ls –al /dev/dsk|grep <mirror disk> mirror_disk_path
#cp /etc/vfstab vfstab
#tar –cvf config_before.tar *
Copy this tar file somewhere outside safe.
5.2 Run SORT Tool And Crate A Customised Report.
Symantec SORT tool can be downloaded from http://sort.symantec.com and can be installed on your server. Copy the software
#cd /data/patching
#scp sort_sol_sparc.sh <hostname>:/var/crash
On client
#cd /var/crash
#./ sort_sol_sparc.sh
This is a self-guiding script, it will ask you few questions, you answer as appropriate. At the end, it will generate 3 xml files and 3 txt files under this directory as follows.
root:#/var/crash/sort/reports
# pwd
/var/crash/sort/reports
root:#:/var/crash/sort/reports
# ls -al
total 21478
drwxr-xr-x 2 root root 512 Jun 14 12:51 .
drwxr-xr-x 6 root root 512 Jun 14 12:29 ..
-rw-r--r-- 1 root root 4760 Jun 14 12:29 <hostname>_IAS_20120614_122931.txt
-rw-r--r-- 1 root root 36857 Jun 14 12:29 <hostname>_IAS_20120614_122931.xml
-rw-r--r-- 1 root root 709 Jun 14 12:29 <hostname>_PDR_20120614_122945.txt
-rw-r--r-- 1 root root 23150 Jun 14 12:29 <hostname>_PDR_20120614_122945.xml
-rw-r--r-- 1 root root 2863104 Jun 14 12:35 <hostname>_PDR_20120614_122945_sanitized.xls -rw-r--r-- 1 root root 106584 Jun 14 12:29 <hostname>_RA_20120614_122934.txt
-rw-r--r-- 1 root root 125754 Jun 14 12:29 <hostname>_RA_20120614_122934.xml
You upload these xml file in to http://sort.symantec.com -> Install and upgrade -> Installation and Upgrade Custom Reports -> upload report, tab.
Once you upload these xml reports, you get 3 reports back in PDF format and also in HTML. They are
Installation and upgrade Report License/Deployment Report Risk Assessment Report
These reports will tell you if you have any show stoppers or any problems you may need to mitigate before an upgrade.
5.3 Pre-requisite to go to VXVM 5.1 SP1.
Although you have got SORT reports, these are important pre-requisits you should be aware.
Existing veritas disk groups should be at layout version 6 or above, you can find this by fstyp –v <filesystem special file>
If veritas version is below SF 4.1 MP2 and want to go to MP2 first, you need this solaris patch or above, 119254-09.
To go to Veritas SF 5.1, you need to have minimum 4.1 MP2.
On your rootdg, you should have two disks mirrored each other to follow the procedure listed in this document.
On your rootdg, you should have two plexes for each volume.
On your rootdg, each plex should only have one subdisks each, else you will have trouble in slicing the disks.
5.4 Do clean reboots from both mirror and root disks.
As we are going to keep mirror disk for regression purpose and will be upgrading on root disk, you should make sure eeprom alias for rootdisk and rootmirror are correct. If they are wrong, please correct it now.
#init 0
Ok>boot mirror (Once booted, check all OK, then)
#init 6
Now both disks are tested and you are back on root disk.
5.5 Check rootdg config is equipped for this upgrade process.
It should have two plexes for each volume and one subdisk each on each plex from different disks, as hown below.
root:#:/root
# vxprint -htg rootdg
DG NAME NCONFIG NLOG MINORS GROUP-ID ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK CO NAME CACHEVOL KSTATE STATE VT NAME NVOLUME KSTATE STATE V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE DC NAME PARENTVOL LOGVOL SP NAME SNAPVOL DCO dg rootdg default default 93000 1180090659.6. dm rootdisk Disk_0 auto 5777 71121402 - dm rootmirror Disk_1 auto 2632 71121402 - v crash - ENABLED ACTIVE 8389656 ROUND - fsgen pl crash-01 crash ENABLED ACTIVE 8389656 CONCAT - RW sd rootdisk-03 crash-01 rootdisk 58730480 8389656 0 Disk_0 ENA pl crash-02 crash ENABLED ACTIVE 8389656 CONCAT - RW sd rootmirror-05 crash-02 rootmirror 58727592 8389656 0 Disk_1 ENA v home - ENABLED ACTIVE 2097152 SELECT - fsgen pl home-01 home ENABLED ACTIVE 2097414 CONCAT - RW sd rootdisk-06 home-01 rootdisk 67120136 2097414 0 Disk_0 ENA pl home-02 home ENABLED ACTIVE 2097414 CONCAT - RW sd rootmirror-06 home-02 rootmirror 67117248 2097414 0 Disk_1 ENA v opt - ENABLED ACTIVE 16779312 ROUND - fsgen pl opt-01 opt ENABLED ACTIVE 16779312 CONCAT - RW sd rootdisk-05 opt-01 rootdisk 25171856 16779312 0 Disk_0 ENA pl opt-02 opt ENABLED ACTIVE 16779312 CONCAT - RW sd rootmirror-03 opt-02 rootmirror 25168968 16779312 0 Disk_1 ENA v rootvol - ENABLED ACTIVE 16779312 ROUND - root pl rootvol-01 rootvol ENABLED ACTIVE 16779312 CONCAT - RW sd rootdisk-02 rootvol-01 rootdisk 8392544 16779312 0 Disk_0 ENA pl rootvol-02 rootvol ENABLED ACTIVE 16779312 CONCAT - RW sd rootmirror-02 rootvol-02 rootmirror 8389656 16779312 0 Disk_1 ENA v swapvol - ENABLED ACTIVE 8389656 ROUND - swap pl swapvol-01 swapvol ENABLED ACTIVE 8389656 CONCAT - RW sd rootdisk-01 swapvol-01 rootdisk 2888 8389656 0 Disk_0 ENA pl swapvol-02 swapvol ENABLED ACTIVE 8389656 CONCAT - RW sd rootmirror-01 swapvol-02 rootmirror 0 8389656 0 Disk_1 ENA v var - ENABLED ACTIVE 16779312 ROUND - fsgen pl var-01 var ENABLED ACTIVE 16779312 CONCAT - RW sd rootdisk-04 var-01 rootdisk 41951168 16779312 0 Disk_0 ENA pl var-02 var ENABLED ACTIVE 16779312 CONCAT - RW sd rootmirror-04 var-02 rootmirror 41948280 16779312 0 Disk_1 ENA
5.6 Take Root mirror disk out of Veritas and convert to slices. You can see the encapsulated volumes in /etc/vfstab as commented. For eg.
#NOTE: volume rootvol () encapsulated partition c0t0d0s0
#NOTE: volume swapvol () encapsulated partition c0t0d0s1
#NOTE: volume opt () encapsulated partition c0t0d0s5
#NOTE: volume var () encapsulated partition c0t0d0s6
#NOTE: volume crash () encapsulated partition c0t0d0s7
If this is not available, this can be seen in /etc/vfstab.prevm as well. Run below to install boot track on the disk and also define the boot partitions in the disk’s VTOC.
#/usr/lib/vxvm/bin/vxbootsetup -g rootdg rootmirror
#prtvtoc /dev/rdsk/<mirror disk>s2
If you have partitions defined for all those encapuslated volume, then it’s fine. Else you need to create them manually by using vxmksdpart command.
Usage : vxmksdpart <subdisk name> <slice number> <tag> <flag>
What should be tag & flag.
Tag Description flag Description
0x00 UNASSIGNED 0x00 MOUNTABLE
0x01 BOOT 0x01 UNMOUNTABLE
0x02 ROOT 0x10 READ-ONLY
0x03 SWAP
0x04 USR
0x05 BACKUP
0x06 STAND
0x07 VAR
0x00 HOME
0x14 Public VxVM
0x15 Private VxVM
For eg.
To recreate the slice for crash on the above example,
#/etc/vx/bin/vxmksdpart rootmirror-05 7 0x00 0x00
If you have more volumes created under Veritas after disk was encapsulated, for eg. /opt/oracle , etc, then you may need to backup that data. If you have more than 5 volumes in rootdg, then the 6th one will be lost during this process. So, you need to back them up.
Disassociate all mirror plexes from volumes. For eg.
root:# vxplex -g rootdg dis home-02
root::/root # vxplex -g rootdg dis opt-02
root::/root # vxplex -g rootdg dis rootvol-02
root::/root # vxplex -g rootdg dis swapvol-02
root::/root # vxplex -g rootdg dis var-02
Now remove plexes from mirror disk
root::/root # vxedit -g rootdg -r rm crash-02
root::/root # vxedit -g rootdg -r rm home-02
root::/root # vxedit -g rootdg -r rm opt-02
root::/root # vxedit -g rootdg -r rm rootvol-02
root::/root # vxedit -g rootdg -r rm swapvol-02
root::/root # vxedit -g rootdg -r rm var-02
root::/root # vxdg -g rootdg rmdisk rootmirror
Fsck the slice volumes in mirror disk.
root::/root # fsck -y /dev/rdsk/c1t1d0s0
root::/root # fsck -y /dev/rdsk/c1t1d0s6
etc
root::/root # mount /dev/dsk/c1t1d0s0 /mnt
root::/root # cd /mnt/etc
root::/mnt/etc # cp -p system system_20062012
root::/mnt/etc # cp -p vfstab vfstab_20062012
#vi /mnt/etc/vfstab (Change Veritas entries to slices), as flike below
/dev/dsk/c1t1d0s1 - - swap - no -
/dev/dsk/c1t1d0s0 /dev/rdsk/c3t1d0s0 / ufs 1 no logging
/dev/dsk/c1t1d0s3 /dev/rdsk/c3t1d0s3 /var ufs 1 no logging
/dev/dsk/c1t1d0s6 /dev/rdsk/c3t1d0s6 /var/crash ufs
#vi /mnt/etc/system (comment the following entries)
Rootdev
Set vxio
root::/mnt/etc # touch /mnt/etc/vx/reconfig.d/state.d/install-db
root::/mnt/etc # rm /mnt/etc/vx/reconfig.d/state.d/ root-done
Remove tag 14 and 15 partitions from mirror disk, they are private and public region.
Format->select mirror disk and remove those 2 partitions and label the disk.
root::/root # umount /mnt
#sync
#sync
#init 0
Ok>boot rootmirror
System should now boot via Slices.This disk is now for regression purpose, we are going to leave this as it is. Once happy, boot via bootdisk again.
#init 6
System should now come back up via root disk and with rootdg in it.
5.7 Take Root disk out of Veritas and convert to slices.
Run below command to unencapsulate the disk partitions. This command will fail if you have more than 5 volumes in rootdg. If there additional volumes created after initial disk encapsulation, you need to backup data and remove that volume first.
root::/root/CRQ # vxunroot
/etc/vx/bin/vxunroot: Error: Disk contains more than 5 volumes which cannot be unencapsulated. Move some volumes to different disk and try again Remove the 6th volume and try again.
root::/root # vxunroot
VxVM vxunroot NOTICE V-5-2-1564
This operation will convert the following file systems from volumes to regular partitions:
crash opt rootvol swapvol var
VxVM vxunroot INFO V-5-2-2011
Replacing volumes in root disk to partitions will require a system reboot. If you choose to continue with this operation, system configuration will be updated to discontinue use of the volume manager for your root and swap devices.
Do you wish to do this now [y,n,q,?] (default: y)
VxVM vxunroot INFO V-5-2-287 Restoring kernel configuration...
VxVM vxunroot INFO V-5-2-78
A shutdown is now required to install the new kernel.
You can choose to shutdown now, or you can shutdown later, at your convenience.
Do you wish to shutdown now [y,n,q,?] (default: n)
VxVM vxunroot INFO V-5-2-258
Please shutdown before you perform any additional volume manager or disk reconfiguration. To shutdown your system cd to / and type
shutdown -g0 -y -i6
Now reboot server.
#sync
#sync
#shutdown –g0 –y –i6
When the system comes back up, it will be mounted on slices.
5.8 Convert Root Disk In To SVM Metas.
Remove tag 14 and tag 15 partitions from root disk, they are public and private region for Veritas and we don’t need them anymore.
Format->root disk, select public and private regions and change the size to 0 and label it.
Create a small partition; say 20mb on root disk for SVM database, metadb, use format command. Better to use recently removed public/private region partition for the same.
#format -> select disk -> select partition and create it, label it
root::/root # metadb -a -f -c 3 c1t0d0s4
root::/root # metadb -a -f -c 3 c1t0d0s4
root::/root # metainit -f d11 1 1 c1t0d0s0 d11: Concat/Stripe is setup
root::/root # metainit d10 -m d11 d10: Mirror is setup
root::/root # metaroot d10
root::/root # metainit -f d1 1 1 c1t0d0s1 d1: Concat/Stripe is setup
root::/root # metainit d0 -m d1 d0: Mirror is setup
root::/root # metainit -f d51 1 1 c1t0d0s5 d51: Concat/Stripe is setup
root::/root # metainit d50 -m d51 d50: Mirror is setup
root::/root # metainit -f d61 1 1 c1t0d0s6 d61: Concat/Stripe is setup
root::/root # metainit d60 -m d61 d60: Mirror is setup
root::/root # metainit -f d71 1 1 c1t0d0s7 d71: Concat/Stripe is setup
root::/root # metainit d70 -m d71 d70: Mirror is setup
edit /etcvfstab and change entries to disk suite instead of slices. Also comment all nonroot Veritas volumes in vfstab, so they won’t get mounted when we reboot. So, it should look like this now,
/dev/md/dsk/d0 - - swap - no -
/dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no logging
/dev/md/dsk/d60 /dev/md/rdsk/d60 /var ufs 1 no logging,nosuid
/dev/md/dsk/d50 /dev/md/rdsk/d50 /opt ufs 2 yes logging
/dev/md/dsk/d70 /dev/md/rdsk/d70 /var/crash ufs
Change dump device to point to SVM meta instead of slice.
root::/etc # dumpadm
Dump content: kernel pages
Dump device: /dev/dsk/c1t0d0s1 (swap)
Savecore directory: /var/crash/
Savecore enabled: yes Save compressed: on
Change this to point to current SVM meta device for swap.
root::/root # dumpadm -d /dev/md/dsk/d0
If you had lost any volumes during unencapsulation process, then you need to create it now and restore it.If you had only one volume lost, you can create that slice partition first by using format and then create meta on it. If you had more than one volumes lost, you may need to create soft partitions.
In this example, we only had /homevol lost and we do have one free partition left.
#format
Select the current root disk Select partition 3 and create partition with remaining space.
In this case c1t0d0s3
#metainit –f d31 1 1 c1t0d0s3
#metainit d30 –m d31
#newfs /dev/md/rdsk/d30
#vi /etc/vfstab (Change the mount device accordingly)
#mountall Restore data from which ever method you backed up.
#init 6 (Make sure it is now booting via disk suite and all looks ok)
5.9 Upgrade Veritas 4.1 MP2.
Copy the software to your server.
#cd /data/patching/Veritas
#scp VRTS_4.1_MP2_sol.tar.gz clent:/var/crash
On Client
#cd /var/crash #gunzip VRTS_4.1_MP2_sol.tar.gz
#tar –xvf VRTS_4.1_MP2_sol.tar
#./ install_vp Type the server name when it asks and then it will take you through.
#init 6 root::/var/crash/MP2
# pkginfo -l VRTSvxvm
PKGINST: VRTSvxvm
NAME: VERITAS Volume Manager, Binaries
CATEGORY: system
ARCH: sparc VERSION: 4.1,REV=02.17.2005.21.28
BASEDIR: /
VENDOR: VERITAS Software
DESC: Virtual Disk Subsystem
PSTAMP: VERITAS-4.1MP2.14:2007-02-21
INSTDATE: Aug 22 2007 12:43
HOTLINE: 800-342-0652
EMAIL: support@veritas.com STATUS: completely installed
FILES: 845 installed pathnames 31 shared pathnames 18 linked files 98 directories 410 executables 300751 blocks used (approx) Now install new license.
#vxlicinst –k <license key>
5.10 Upgrade Veritas version to 5.1 SP1. Copy the software Login to uppsala2
#cd /data/patching/Veritas
#scp VRTS_SF_HA_Solutions_5.1_SP1_Solaris_SPARC.tar.gz :/var/crash On
#cd /var/crash
#gunzip VRTS_SF_HA_Solutions_5.1_SP1_Solaris_SPARC.tar.gz
#tar –xvf VRTS_SF_HA_Solutions_5.1_SP1_Solaris_SPARC.tar
# cd dvd1-sol_sparc
#./ installer Type server name when asked. Type “G” for upgrade when asked. Do a reboot finally
#init 6
5.11 Attach Mirror Back To SDS/SVM.
This step should only be done after you got confirmation from user that everything is OK and no regression needed.
#prtvtoc /dev/rdsk/<current root disk>s2 | fmthard –s - /dev/rdsk/<mirror disk>s2
# metadb -a -f -c 3 c1t1d0s4
#metainit –f d12 1 1 c1t1d0s0
#metainit –f d2 1 1 c1t1d0s1
#metainit –f d32 1 1 c1t1d0s3
#metainit –f d52 1 1 c1t1d0s5
#metainit –f 62 1 1 c1t1d0s6
#metainit –f d72 1 1 c1t1d0s7
#metattach d10 d12
#metattach d0 d2
#metattach d30 d32
#metattach d50 d52
#metattach d60 d62
#metattach d70 d72
#metastat (Check all volumes are mirrored)
No comments:
Post a Comment