1 2 Previous Next 21 Replies Latest reply: Nov 2, 2012 4:17 AM by JohnWatson RSS

    Manually Failover a VIP - How To?

    thetrent
      For example - when you bounce a node or a node crashes, the vip for that node then floats to a surviving node- works great.

      When you want to apply the security patches to the nodes in the cluster, you typically issue srvctl stop nodeapps -n node1.

      When you do that, the vip obviously shuts down as well on node1. With customers using the TAF entry, new connections will pause if the connection attempts to connect to node1 first - node1's vip is down - but will eventually connect.

      Is there a way to shutdown nodeapps on node 1, and manually fail the vip from node1 over to node2 and run the security patch on node1?

      This way no delays would be seen by customers -

      Thanks in advance -
        • 1. Re: Manually Failover a VIP - How To?
          Murali Vallath
          yes you can..

          However it has to be done before you stop nodeapps ...this is the step I have followed

          stop the instance on the node
          stop ASM on the node
          stop the listener on the node
          Then you can relocate the VIP using the crs_relocate utility found in CRS_HOME/bin directory

          % ./crs_relocate ora.oradb1.vip
          Attempting to stop `ora.oradb1.vip` on member `oradb1`
          Stop of `ora.oradb1.vip` on member `oradb1` succeeded.
          Attempting to start `ora.oradb1.vip` on member `oradb2`
          Start of `ora.oradb1.vip` on member `oradb2` succeeded.
          • 2. Re: Manually Failover a VIP - How To?
            thetrent
            Very cool - thanks Murali -

            I will give this a shot in the am and play around with it -
            • 3. Re: Manually Failover a VIP - How To?
              580927
              Hi,

              Apart from vip, what other resources can be relocated ?

              for Eg.,

              is it possible to relocate listener etc ??

              Rgds.
              • 4. Re: Manually Failover a VIP - How To?
                516450
                is it possible to relocate listener etc ??
                I don't think it would be possible, because all other resources are node-specific and may be we can't have multiple sets of those resources running on one node with the exception of VIP. As regards, I don't think even this would be possible because technically, the relocated VIP would be pointing the physical address of the suriving node, on which a listener might already been running, and you can't startup two listeners on the same host with the same port. Possibly, if you manage to change the port number, you might be, but I don't see a real purpose of it. My 2 cents.
                • 5. Re: Manually Failover a VIP - How To?
                  218022
                  The relocate works fine, but when I stop the nodeapps, the vip goes offline. Do the nodeapps need to be taken down individually? What is the process for that?

                  $ srvctl stop instnace -d s1at2_cuorat -i s1at23
                  $ srvctl stop listener -l S1AT2 -n cuorat03
                  $ srvctl stop asm -n cuorat03
                  $ srvctl stop listener -l LISTENER_CUORAT03 -n cuorat03
                  $ crsstat| grep vip
                  ora.cuorat01.vip ONLINE ONLINE on cuorat01
                  ora.cuorat02.vip ONLINE ONLINE on cuorat02
                  ora.cuorat03.vip ONLINE ONLINE on cuorat03

                  $ crs_relocate ora.cuorat03.vip
                  Attempting to stop `ora.cuorat03.vip` on member `cuorat03`
                  Stop of `ora.cuorat03.vip` on member `cuorat03` succeeded.
                  Attempting to start `ora.cuorat03.vip` on member `cuorat01`
                  Start of `ora.cuorat03.vip` on member `cuorat01` succeeded.
                  $ crsstat| grep vip
                  ora.cuorat01.vip ONLINE ONLINE on cuorat01
                  ora.cuorat02.vip ONLINE ONLINE on cuorat02
                  ora.cuorat03.vip ONLINE ONLINE on cuorat01

                  $ srvctl stop nodeapps -n cuorat03
                  CRS-0216: Could not stop resource 'ora.cuorat03.LISTENER_CUORAT03.lsnr'.

                  $ crsstat| grep vip
                  ora.cuorat01.vip ONLINE ONLINE on cuorat01
                  ora.cuorat02.vip ONLINE ONLINE on cuorat02
                  ora.cuorat03.vip OFFLINE OFFLINE


                  Jeff
                  • 6. Re: Manually Failover a VIP - How To?
                    516450
                    Jeff,

                    When you stop the nodeapps - it would stop all the Oracle resources (such as listeners, instances.....) and the three components which comprise the nodeapps - VIP/GSD/ONS.
                    Just using "srvctl stop nodeapps -n <node_name>" should bring down VIP/GSD/ONS - you don't have to bring them down individually.

                    >>.but when I stop the nodeapps, the vip goes offline
                    As I said, VIP is a component of Nodeapps - therefore, stopping the nodeapps would bring down the VIP as well....

                    HTH
                    Thanks
                    -Chandra Pabba
                    • 7. Re: Manually Failover a VIP - How To?
                      218022
                      But we need to have the vip relocated and remain online during a planned outage in order to avoid TCP timeout delays. How do I do that?

                      Jeff
                      • 8. Re: Manually Failover a VIP - How To?
                        413311
                        maybe just stop the CRS on that node with crsctl stop
                        • 9. Re: Manually Failover a VIP - How To?
                          218022
                          Stopping CRS also knocks down nodeapps.
                          • 10. Re: Manually Failover a VIP - How To?
                            218022
                            I get what you are suggesting now.
                            crs_relocate ora.cuorat03.vip
                            crsctl stop crs

                            Then, from another node.
                            $ crsstat| grep vip
                            ora.cuorat01.vip ONLINE ONLINE on cuorat01
                            ora.cuorat02.vip ONLINE ONLINE on cuorat02
                            ora.cuorat03.vip ONLINE ONLINE on cuorat01

                            This seems to work. It is just that it takes GSD and ONS down hard. It would be nice to find a cleaner solution.

                            Jeff
                            • 11. Re: Manually Failover a VIP - How To?
                              PhilipRN-Oracle
                              Just a coment - You must not use any crs_commands against Oracle resources (other than crs_stat) - see the Oracle doc this is explicitly forbidden
                              • 12. Re: Manually Failover a VIP - How To?
                                218022
                                Then how do we relocate the vip?

                                Jeff
                                • 13. Re: Manually Failover a VIP - How To?
                                  598389
                                  Philip,

                                  I do not see any reason why we can not use crs commands to manage resources. crs_start and crs_stop etc.. are meant for that only, Say one of CRS resource is down by some reason so you can try to restart it by crs commands rather using srvctl command..

                                  If you know anything specifically why not to use it.. Please share..

                                  Thanks
                                  • 14. Re: Manually Failover a VIP - How To?
                                    516450
                                    May be because use of those commands is not supported. Here is the extract from the documentation:

                                    Note: Do not use the Oracle Clusterware commands crs_register, crs_profile, crs_start or crs_stop on resources with names beginning with the prefix ora unless either Oracle Support asks you to, or unless Oracle has certified you as described in http://metalink.oracle.com.

                                    I am sure Philip may have more to add.

                                    Thanks
                                    Chandra
                                    1 2 Previous Next