Pages

Friday, March 12, 2010

Veritas Volume Manager Upgrade from 3.x series to 5

Symantec does not recommend Vxvm upgrade from 3.5 or lesser version to be upgraded directly to version 5. However, this has been tested and implemented in 200 odd boxes in the environment I have worked. So far, I have faced issues only in one box for which upgrade was done from version 3.5 to version 4 and then from 4 to 5.

One important thing to be noticed here is after the upgrade the veritas maintains the licence in the old format. ( version 3.x series are in numerical format while in version 5 it is in alpha numeric ) This may cause issues if you are working on CDS. ( cross data sharing ). One needs to talk to Symantec and get the new licence in alpha numeric format in this case.

For Solaris 8
----------------

Prerequisite

Kernel Patch - Generic_117350-39 ( 36 and above recommended )
Other Patches - 113201-05, 110435-08 ( or higher versions )


Solaris 10

-------------

Recommended latest cluster patch.


1. Sanity boot
#reboot

2. Confirm the patches are present.
#showrev –p grep 113201-05
#showrev –p grep 110435-08

3. Deport all disk groups connected to the box from storage.
#vxdg deport dgname
#vxdg deport appsdg ( Example )

4. Detach the mirror disks. ( Extremely important. As the upgrade may
sometimes result in unexpedted output it is wiser to detach the disks. )

OPtion 1 : Just pull out the mirror disk without running any commands
from OS level. By this , when things go bad, you can insert the disk and
directly boot it from mirror disk

Option 2 : Detach from veritas level using the command. The problem
with this method is , when you try to boot the disk from mirror, the disk will not boot since the volumes are detached. Hence you need to go to single user mode and unencapsulate the disk and then boot the mirror disk without veritas. Time consuming and hence not recommended by me. Remote admins can do this if you do not access to DC at the time of upgrade.

#vxplex –g rootdg dis rootvol-02 swapvol-02 var-02
#vxprint -vht rootvol; vxprint -vht swapvol; vxprint -vht var { Confirm
the mirror is detached.

Note: Ensure that the plex that is detached is NOT the boot disk by checking the prtconf output. The boot disk may have been changed to mirror
due to some reason. Hence confirm and detach.

5. Unencapsulate the root disk
cd /etc/vx/bin
./vxunroot

Note: If any error messages are returned for this output, then one needs to do the unencapsulation manually. If notes are needed for manual encapsulation leave a message with your email id and I will post it across.
Please also note that if you volumes other than root, swap and var configured under rootdg then the vxunroot command will not work. You need to remove it from rootdg and then run the command. ( Ensure that while you remove the extra volumes from veritas, underlying data is intact )

6. Remove current veritas packages.

pkgrm VRTSvxvm VRTSvxfs VRTSvlic { Advice you to run a script and get all
the veritas packages first and then remove them )

7. cd to the path where the veritas volume manager software is downloaded.

8. Run the installation script

Option 1:

#./installer
select veritas volume manager installation first and then veritas file system

Option 2:
#./installvm
#./installfs

To install veritas volume manager and fs seperately

9. Confirm that veritas 5 is installed.

pkginfo –l VRTSvxfs
pkginfo –l VRTSvxfs


10. Reboot { This will reboot twice }

11. Vxinstall { Will review the license and start processes , Give no if it asks any questions}
12. Encapsulate the disk
#vxdiskadm , option 2.
13. Reboot
14. Import the disk group back
#vxdg import appsdg


Note: If T3 storage is attached, then do not apply Mp1 patch. Apply the following commands for T3.Mp1 is mandatory for EMC connected storage.


1. Configure the T3 or T3+ array in autotrespass mode. (Set for
mode:rw)
2. Add the array as a JBOD of type A/P:
# vxddladm addjbod vid=SUN pid=T300 policy=ap
# vxdctl enable
# vxddladm listjbod
#Mount filesystems and ReStart all applications

2 comments:

Steven said...

Dear Sir,

could you please send me the procedure to manually unencapsulate ? I got 6 volumes (swap, /, /var, /home, /opt and /opt/src) that are inside the rootdg.

Thanks in advance !

Best regards,
Steven

Sheenz said...

Steven,

Here is the procedure.

1. Take a copy of the existing vfstab file ( Roll over just in case it is not working )

cp -p /etc/vfstab /etc/vfstab.`date`

2. Comment out all the veritas entries in the vfstab. Keep the entry in raw disk format.
( For your reference, generally there will be a copy of vfstab orig file with the raw disk format in etc folder. Please ensure that the correct slices are mounted to correct file systems. )

3. cd /etc/vx/reconfig.d/state.d
4. rm -rf root-done
5. touch install-db
6. Reboot

I have noticed that vxunroot does not normally work if there are volumes other than root, swap and var under rootdg. Another alternate method will be delete the volumes ( ofcourse keeping the underlying data ) and then doing an vxunroot. But I do NOT recommend that method since it involves risk of data loss.

Note: In case the server is going to maintenance mode, copy the vfstab file back, remove the install-db file and touch root-done and reboot. The server will come back up with rootdg under veritas.

Thanks and let me know if its working. It will be good if you can share your blog as well.

- Sheena.