Saturday, October 20, 2007

Using VCS Failover to Upgrade Group Components!

Hey There,

This, like many of my posts, may be old hat to some folks, but here's a little something for those of you who might find it of interest.

We'll assume we have two systems (sysa and sysb) each with the ability to run one or more of 4 service groups (grpa, grpb, grpc and grpd) and their related services. For this example's sake, sysa is running grpa and grpb and sysb is running grpc and grpd.

So now, both machines (sysa and sysb) need to have a patch installed, or something like that, and you can't afford for your product to go down. With Veritas Cluster HA failover (VCS), it's a pretty simple thing to do (now, we're assuming everything goes well, of course ;)

Since we're going to upgrade sysa first, we need to move all the services over to sysb. You have, basically, two options here (at minimum) since you want to move everything off. Either (from sysa):

hagrp -switch grpa -to sysb
hagrp -switch grpb -to sysb

or
hagrp -offline grpa -sys sysb
hagrp -offline grpb -sys sysb


The second option (using "-offline") means that you'll need to online the service groups on sysb if they don't fail over automatically

hagrp -online grpa -sys sysb
hagrp -online grpb -sys sysb


To make sure it sticks during your work (i.e. in case Veritas gets smart and decides that sysa is okay and tries to move the service groups back!)

From sysa:
hagrp -freeze grpa
hagrp -freeze grpb


You can use the "-persistent" flag on the freeze, if you need it to be down after reboot (e.g. hagrp -freeze grpa -persistent)

You basically do the same thing in reverse to get stuff back to normal, and then switch all the service groups to sysa so you can upgrade sysb. There are other options to make things go faster, but it all gets a little complicated and long-winded at some point ;)

Just a few quick tips. Someone could write a book about the little things in VCS. I think a few thousand people already have :)

, Mike