Saturday 20 September 2014

Root Mirror Testing in Veritas Volume manager

# verify what disk you are booted off of

prtconf -vp|grep bootpath

#####
#verify if bootpath and either rootdisk and rootmirror are the same
#####

prtconf -vp|grep rootdisk
prtconf -vp|grep rootmirror

# Break the mirror(ie the disk that does NOT match the bootpath disk)
# so the new environment can be created.
# Verify that the 0# plexes are really the non-bootpath plexes
# Make sure you remove the plexes that are associated to the non-bootpath plexes
# Replace ## with the number associated to the non-bootpath plex
# Example:
# v rootvol
# pl rootvol-01 (Remove pl associated with "sd" rootmirror)
# sd rootmirror-02 (In this example you would remove plex "rootvol-01")

vxprint -htg rootdg

# Disassociate the plex from the volumes rootvol,swapvol and var

vxplex -g rootdg dis rootvol-##
vxplex -g rootdg dis swapvol-##
vxplex -g rootdg dis var-##

# remove the plexes rootvol-##,swapvol-##,var-##

vxedit -rf rm rootvol-##
vxedit -rf rm swapvol-##
vxedit -rf rm var-##

# Double check and make sure the plexes were removed.

vxprint -htg rootdg

# Now remove the rootmirror/non-bootpath from the disk goup and unset it up.
# Replace c#t#d# with the rootmirror/non-bootpath disk number

vxdg rmdisk rootmirror
vxdiskunsetup -C c#t#d#

############################
###Disable Veritas on the rootmirror disk
############################

Mount the disk (rootmirror in this case)

mount /dev/dsk/c#t#d#s# /mnt

touch /mnt/etc/vx/reconfig.d/state.d/install-db

rm /mnt/etc/vx/reconfig.d/state.d/root-done

make appropriate changes to the /etc/vfstab file( there should not be anything like /dev/vx)

# Double-check the /mnt/etc/system and comment out the rootdev entries
# if they are there

vi /mnt/etc/system

# Only comment out the following entries

rootdev:/pseudo/vxio@0:0
set vxio:vol_rootdev_is_volume=1

umount /mnt

reboot --- -s

and proceed with patching, if something goes wrong and you need to backout you can boot off the rootmirror and run vxinstall to enable veritas again and then encapsulate..

No comments:

Post a Comment