Root Mirror Breaking

This procedure is designed to preserve the root mirror disk before applying patches or upgrading. It provides an efficient path for recovery if the upgrade or patch installation is unsuccessful

1. Check that the boot disk has a valid mirror

The volumes associated with the root disk should have a single subdisk for each of the root disk and root mirror plexes.

Disks:
rootdisk is c1t0d0s2
rootmirror disk is c1t1d0s2

# vxprint -htqg rootdg

2. Install the Solaris boot block on the mirror disk:
# /usr/lib/vxvm/bin/vxbootsetup -g rootdg rootmirror
or
#installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t1d0s0

3. Disassociate the mirror plex:
# vxplex -g rootdg dis rootvol-01
# vxplex -g rootdg dis swapvol-01
# vxplex -g rootdg dis usr-01
# vxplex -g rootdg dis var-01
# vxplex -g rootdg dis opt-01
# vxplex -g rootdg dis tsm-01
# vxplex -g rootdg dis crash-01
# vxplex -g rootdg dis home-01
# vxplex -g rootdg dis VRTSccdam-01
# vxplex -g rootdg dis SUNWspro-01

4. Edit the following files to make the root mirror disk bootable without VERITAS Volume Manager ™:
# mount /dev/dsk/c1t1d0s0 /mnt
# cd /mnt/etc
# cp -p system system.orig
# cp -p vfstab vfstab.orig

Change the c1t1d0s0,s1,s5,s6,s7 number in above file to ensure the correct partitions will be referenced in the vfstab file:

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

Edit /mnt/etc/system and comment out following lines using the “*” character:

Before changes:
rootdev ..
set vxio ..

After changes:
* rootdev ..
* set vxio ..

5. Unmount the root mirror’s / partition
# umount /mnt
#eeprom “boot-device=vx-rootdisk vx-rootmirror”
#eeprom “diag-device=vx-rootdisk vx-krootmirror”
#init 1

6. Apply patches or upgrade system per Installation Guide
#cd /var/tmp/8_Recommend
#./install_cluster
#init 6
7. Determine if the upgrade was successful
#uname -a
#cd /var/tmp/patches
#patchadd <patch>

108773-18
108921-17
108940-57
112003-03
112438-03

#init 6

8. Determine if the upgrade was successful
#showrev -p <patch>

9. Ask DBA team to verify from their end

10. If the upgrade or patching was successful, attach back mirror plex to root disk:

# vxplex -g rootdg att rootvol rootvol-02
# vxplex -g rootdg att swapvol swapvol-02
# vxplex -g rootdg att var var-02
# vxplex -g rootdg att usr usr-02

or

If the upgrade or patching was not successful and want to go back to mirror disk, then follow this procedure:

1. Boot from mirror disk

– Bring down the system to the OK prompt
– Change the default boot device to c1t1d0 rootmirror disk
– Boot system

2. Determine which version of VERITAS Volume Manager is installed:

The procedure if you are running VERITAS Volume Manager 3.5 and below:

# vxinstall => custom installation => choose to encapsulate current bootdisk (eg. c1t1d0) => leave other disk alone.
It will ask whether you want to preserve Volume Manager information on another disk, answer yes to this question

a. Reboot is required after running vxinstall:

# vxdisk -f init c1t0d0
# vxdg -g rootdg adddisk rootdisk=c1t0d0

b. Mirror root mirror disk with original rootdisk:

# /etc/vx/bin/vxrootmir rootdisk
# /etc/vx/bin/vxmirror rootmirror rootdisk

Final vxprint will look as follows:

# vxprint -htqg rootdg

*******************************************************************
corpt027[root]>vxprint -pv -g rootdg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
pl SUNWspro-01 SUNWspro ENABLED 1077597 – ACTIVE – –
pl SUNWspro-02 SUNWspro ENABLED 1077597 – ACTIVE – –
pl VRTSccdam-01 VRTSccdam ENABLED 4194828 – ACTIVE – –
pl VRTSccdam-02 VRTSccdam ENABLED 4194828 – ACTIVE – –
pl crash-01 crash ENABLED 20974140 – ACTIVE – –
pl crash-02 crash ENABLED 20974140 – ACTIVE – –
pl home-01 home ENABLED 1025595 – ACTIVE – –
pl home-02 home ENABLED 1025595 – ACTIVE – –
pl opt-01 opt ENABLED 2097414 – ACTIVE – –
pl opt-02 opt ENABLED 2097414 – ACTIVE – –
pl rootvol-01 rootvol ENABLED 1048707 – ACTIVE – –
pl rootvol-02 rootvol ENABLED 1048707 – ACTIVE – –
pl swapvol-01 swapvol ENABLED 8389656 – ACTIVE – –
pl swapvol-02 swapvol ENABLED 8389656 – ACTIVE – –
pl tsm-01 tsm ENABLED 1640952 – ACTIVE – –
pl tsm-02 tsm ENABLED 1640952 – ACTIVE – –
pl usr-01 usr ENABLED 4194828 – ACTIVE – –
pl usr-02 usr ENABLED 4194828 – ACTIVE – –
pl var-01 var ENABLED 3146121 – ACTIVE – –
pl var-02 var ENABLED 3146121 – ACTIVE – –
v SUNWspro fsgen ENABLED 1075200 – ACTIVE – –
v VRTSccdam fsgen ENABLED 4194304 – ACTIVE – –
v crash fsgen ENABLED 20971520 – ACTIVE – –
v home fsgen ENABLED 1024000 – ACTIVE – –
v opt fsgen ENABLED 2097414 – ACTIVE – –
v rootvol root ENABLED 1048707 – ACTIVE – –
v swapvol swap ENABLED 8389656 – ACTIVE – –
v tsm fsgen ENABLED 1638400 – ACTIVE – –
v usr fsgen ENABLED 4194828 – ACTIVE – –
v var fsgen ENABLED 3146121 – ACTIVE – –