cancel
Showing results for 
Search instead for 
Did you mean: 

How to separate boot disk mirror (for emergency reboot)?

prupp62
Level 3
Hello All,

We normally run under Solaris 10 with 2 boot disks that are encapsulated and mirrored using VxVM v5.0MP1
Prior to patching, we want to protect ourselves by somehow splitting the mirror...such that the second disk is separately bootable..into it's own VxVM, as if you had encapsualted the second disk alone, without mirroring.
I'm not even sure if this is possible.

We typically boot from the primary disk (1st disk), and install patches.
If the patches cause a problem and the system fails to boot,
we want to boot from the 2nd (separated disk), and later....mirror 2nd disk back to the 1st disk, 

This seems like such a mystic science....I have not seen any articles about it or documentation from Symantec.
Any assistance is most appreciated.
Regards,
Peter


 
6 REPLIES 6

Gaurav_S
Moderator
Moderator
   VIP    Certified
Hello,

This is surely possible & always part of best practice... When your system is good up & running with mirror, you can disassociate the plexes of your mirror disk from the volumes & later use the disk for separate boot....

# vxplex -g <diskgroup> dis <plex>

above command should be of your interest...

So once plexes are disassociated, they are not touched anymore, you can carry patching with your main rootdisk, in case any failure happens, you can anytime boot with your good mirror copy....

Hope this helps.

Gaurav

sunshine_2
Level 4

here is some more information:

once the plexes are disassociated they become stale plexes and you cannot boot off those plexes.

#########################################################
### Breaking the correct "mirror" steps
### The mirror is the disk that does NOT match bootpath
#### this is "usually" the rootmirror disk
##########################################################

# 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..



Gaurav_S
Moderator
Moderator
   VIP    Certified
Hello,

This looks good to me....

I always however trust server to bring down to OK prompt & check the devalias so that can boot from the correct disk....

Gaurav

sunshine_2
Level 4

Gaurav,

the scenario i presented here assumes :

1st boot disk is called rootdisk and has an devalias as rootdisk

2nd boot disk is called rootmirror and has an devalias as rootmirror


Gaurav_S
Moderator
Moderator
   VIP    Certified
Hello,

yup, thats always best names to call....

If you have doubt that once plexes are disassociated (from rootmirror) & you can not boot from them, then your doubt is valid.... Ideally that will call to boot from slices of rootmirror disk (so unencapsulate) by manually editing the /etc/system & /etc/vfstab as metioned on your post...

Rest procedure looks good...

Gaurav

ScottK
Level 5
Employee
Let me just call your attention to 2 other resources:

If you're 5.0MP2 or earlier, see this technote:
http://seer.entsupport.symantec.com/docs/266847.htm

If you're 5.0MP3 or later, check out the vxrootadm command, which automates some of the steps:
http://sfdoccentral.symantec.com/sf/5.0MP3/solaris/manpages/vxvm/man1m/vxrootadm.html