cancel
Showing results for 
Search instead for 
Did you mean: 

Elegant Method to upgrade by breaking Mirrored rootdisk & rootmirror needed

cowboycraig
Level 4

Elegant Method to upgrade by breaking Mirrored rootdisk & rootmirror needed.

 
Need to upgrade and want to elegantly break the mirrored rootdisk & rootmirror before upgrade.

 
Does anyone have a method to do this that has worked? I want to break the mirror so I can boot off rootmirror and then mirror rootmirror -> rootdisk.

 

Thanks!

Craig

 http://3rdstone.net

 



12 REPLIES 12

cowboycraig
Level 4

Also I am able to boot from either, have devalias's in place. So that is already good to go.

Craig


springer
Level 4
There is a few ways

1. vxplex detach all the mirror plex's .. do upgrade if all goes good re-attach and they will start syncing otherwise if stuff goes to crap
 option 1 boot of cd unencpaulate the mirror disks manually aka boot of slcies and when ur up and all ok ... re-encap mirror disks and then re-init old rootdisk and mirror back..

option 2 u could play with vxplex det rootplex and re-add old detached mirror plexes but that ur choice

rich

cowboycraig
Level 4

I will work with that.

Also was thinking I could pull out my rootmirror, then upgrade.
If all goes well stick it back in.

If all goes bad, reboot and pull out rootdisk, and put in rootmirror.
After booted but rootdisk back in. Just need to make sure mirroring does not start.
Testing that. Could always wipe the drive first.

Craig




springer
Level 4
True that will work but u may have to make sure volumes enabled etc as hwen u pull drive that plex with be disbaled

cowboycraig
Level 4
I tried the pulling the rootmirror method some in testing.
Don't like it. Too many issues when you put the disk back.
Had to reboot to get it working again.

Better the break the mirror.

Figuring the commands out now. I want to be able to boot from the rootmirror if all goes wrong.

Is there a command or commands to "just stop mirroring a mirror" ? without unconfiging it?

Craig

cowboycraig
Level 4



How to backout using rootdisk & rootmirror notes.
Not sure (still working out) how to mirror back from rootmirror if upgrade goes wrong.


#vxdisk -o alldgs list
DEVICE       TYPE            DISK         GROUP        STATUS
c1t0d0s2     auto:sliced     rootdisk     rootdg       online
c1t1d0s2     auto:sliced     rootmirror   rootdg       online


#vxprint -ht          
v  rootvol      -            ENABLED  ACTIVE   30222768 ROUND     -        root
pl rootvol-01   rootvol      ENABLED  ACTIVE   30224160 CONCAT    -        RW
sd rootdisk-01  rootvol-01   rootdisk 0        30224160 0         c1t0d0   ENA
pl rootvol-02   rootvol      ENABLED  ACTIVE   30224160 CONCAT    -        RW
sd rootmirror-03 rootvol-02  rootmirror 5137920 30224160 0        c1t1d0   ENA

v  swapvol      -            ENABLED  ACTIVE   1041352  ROUND     -        swap
pl swapvol-01   swapvol      ENABLED  ACTIVE   1042560  CONCAT    -        RW
sd rootdisk-02  swapvol-01   rootdisk 30224160 1042560  0         c1t0d0   ENA
pl swapvol-02   swapvol      ENABLED  ACTIVE   1042560  CONCAT    -        RW
sd rootmirror-01 swapvol-02  rootmirror 0      1042560  0         c1t1d0   ENA

v  var          -            ENABLED  ACTIVE   4094728  ROUND     -        fsgen
pl var-01       var          ENABLED  ACTIVE   4095360  CONCAT    -        RW
sd rootdisk-03  var-01       rootdisk 31266720 4095360  0         c1t0d0   ENA
pl var-02       var          ENABLED  ACTIVE   4095360  CONCAT    -        RW
sd rootmirror-02 var-02      rootmirror 1042560 4095360 0         c1t1d0   ENA


1)
vxplex det
    Detach each of the named plexes. Detaching a plex leaves the plex associated with its volume, but prevents normal volume I/O from being directed to the plex. This operation can be applied to plexes that are enabled or disabled. The rules for performing the detach depend upon the usage types of the volumes involved. The operation does not apply to dissociated plexes.

# Disassociate plexes on rootmirror
vxplex -g rootdg det rootvol-02 swapvol-02 var-02


vxprint -ht
v  rootvol      -            ENABLED  ACTIVE   30222768 ROUND     -        root
pl rootvol-01   rootvol      ENABLED  ACTIVE   30224160 CONCAT    -        RW
sd rootdisk-01  rootvol-01   rootdisk 0        30224160 0         c1t0d0   ENA
pl rootvol-02   rootvol      DETACHED STALE    30224160 CONCAT    -        RW
sd rootmirror-03 rootvol-02  rootmirror 5137920 30224160 0        c1t1d0   ENA

v  swapvol      -            ENABLED  ACTIVE   1041352  ROUND     -        swap
pl swapvol-01   swapvol      ENABLED  ACTIVE   1042560  CONCAT    -        RW
sd rootdisk-02  swapvol-01   rootdisk 30224160 1042560  0         c1t0d0   ENA
pl swapvol-02   swapvol      DETACHED STALE    1042560  CONCAT    -        RW
sd rootmirror-01 swapvol-02  rootmirror 0      1042560  0         c1t1d0   ENA

v  var          -            ENABLED  ACTIVE   4094728  ROUND     -        fsgen
pl var-01       var          ENABLED  ACTIVE   4095360  CONCAT    -        RW
sd rootdisk-03  var-01       rootdisk 31266720 4095360  0         c1t0d0   ENA
pl var-02       var          DETACHED STALE    4095360  CONCAT    -        RW
sd rootmirror-02 var-02      rootmirror 1042560 4095360 0         c1t1d0   ENA

*Note: all plexes detached (det) are "DETACHED STALE" Good.



2)
# Do upgrade






3.a)
If all goes well, re-attach rootmirror plexes

att
    Attach each named plex to the named volume. This can be applied to dissociated plexes, or to non- enabled plexes already associated with the named volume. If the volume is enabled, then the result of the successful operation will be to associate the plex (if needed) and to recover the plex to have the same contents as all other attached plexes in the volume. The rules for performing the attach depend upon the usage type of the named volume.

    Attaching a plex is the normal means of recovering a plex after a disk replacement, or after a plex offline.


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





3.b)
If all goes not so well, ???

Not sure how to go from this point?

Will rootmirror boot from the OK prompt?

Also how will mirroring take place, if booting from rootmirror?


springer
Level 4
Pls make sure when u detach u also disassociate aka vxples dis as if u reboot and u have detach there is a vxrecover script called in rc scripts and it will start syncing so always dis as well

what i would do when det and dis and upgrade goes **bleep** is like i mentioned unecnpulate the mirror disks aka boot of slcies if u dont know how let me know ..

then wen up on mirror  of slcies then  i would zero out public and priv resgion slcie of both disks aka tag 14 and 15 akia get rid of all trace of rootdg  and then re-encpaule the mirror disk and then when that done add rootdisk aka via vxdiskadm and re-mirror

to me this way u cant go wrong !!!!

there is always couple of ways but u cant go wrong here and it will of course put baack devalias and boot block

springer

cowboycraig
Level 4

"Like i mentioned unecnpulate the mirror disks aka boot of slcies if u dont know how let me know .."

I am not sure what you mean, so tell me.

THANKS! for all your help,
Craig



springer
Level 4
boot of cdrom

mount rrotdisk to /a for example

vi /a/etc/system

and edit by putiimng a star in from of following

* rootdev:/pseudo/vxio:0.0
* set vxio:vol_rootdev_is_volume=1


also chnage vstab to point to slice aka verify /etc/vstbab.prevm is correct and if so copy back and breoot

the u are booting of slcies with vxvm

cowboycraig
Level 4
I am going to try booting from slices. But that seems like a lot of trouble.
Was thinking of just pulling rootdisk, and rebuilding it. That is an easy task.

Then if the upgrade goes wrong reboot and pull rootdisk and rootmirror, and replace earlier created rootdisk.
Then building a new rootmirror is an easy task.

Does anyone see any trouble with this? Yes you have to physically pull the drives and that is an issue in some cases, but other then that?

Thanks!
Craig



cowboycraig
Level 4

I can pull rootdisk or rootmirror, and reboot. That is no issue.
Adding them back is no issue.

Also making a new rootdisk or rootmirror is easy and can be done before hand. Just pull rootdisk or rootmirror and rebuild it. Info on that is here:
http://sysunconfig.net/unixtips/jmr_Mirroring_Boot_Disks_Veritas_Volume_Manager.htm
You can look at "How to Recover from Mirror Disk Failure" That covers creating a new rootdisk.
Then if all goes wrong you could just pull both rootdisk, and rootmirror and replace the rootdisk with one you created before upgrade. I like that idea. Making a new rootmirror is easy stuff, and can be done quickly.

I did get a string going but am not sure if i really like the idea of the method put fourth. That is too much work after going through something not going right.

https://forums.symantec.com/syment/board/message?board.id=86&thread.id=2489&view=by_date_ascending&p...

This week I am testing this out, will let you know how it goes.

Craig



cowboycraig
Level 4

Could not get all my post to fit on method to "Rollback to Rootdisk"
I have worked through this a few times and found it to work.

http://www.3rdstone.net/docs/vcs_node/RollBack_Rootdisk.html


Any updates/feedback/what-ever is welcome and I will update.

Thanks!
Craig