cancel
Showing results for 
Search instead for 
Did you mean: 

Shutdown Windows server with VCS

Edward_Tse
Level 2

Hi

Do I need to stop the VCS before I shutdown Windows servers ?

I need to shutdown both primary & secondary Windows servers.

What happen if I didn't stop the VCS before shutdown Windows ?

 

Ed

1 ACCEPTED SOLUTION

Accepted Solutions

mikebounds
Level 6
Partner Accredited

I'll try to make it more clear:

If you shutdown the servers you should offline all the service groups first by using GUI or from CLI using:

 hagrp -offline service_group -any

for each service group

It is not necessary to stop VCS, i.e you don't need to stop VCS service in services manager, or use "net stop had" or "hastop -all".  You could stop VCS as an alternative to offlining SGs as stopping the VCS service will put VCS in a "leaving state" and offline all the service groups for you and then stop the service and this will work most of the time, however if a VCS resource gets stuck in a transitional state, then you can't use any hagrp commands, particularly "hagrp -flush" in a "leaving state" which is why I recommend manually offlining service groups.

Also, if you just shutdown both servers roughly at the same time, without doing anything in VCS first then most times this will work if a resource does not get stuck in a transitional state or there is not too much delay between shutting down both servers so that VCS does not have change to failover services on to the other node.

So in short, my recommendation is to stop all service groups first, but if you don't, VCS will still cleanly shutdown properly in MOST instances.

Mike

View solution in original post

5 REPLIES 5

mikebounds
Level 6
Partner Accredited

You do not HAVE to shutdown VCS, but I would advise you stop/switch service groups first.

When you shutdown or reboot a system, VCS runs hastop - evacuate so that service groups are stopped on that node and started on another node.  If you reboot both servers, then if you rebooted 2nd server before the first server had stopped its services, you would be ok, but you will get in a mess if the services had started to start on the 2nd server when you shut it down.

If you are rebooting just one server, if you want the service groups on that server to stay down (not switch to the other node), then you should stop those service groups first, but even if you want the service groups to switch to the other node, I would do this manually.  If you rely on VCS to switch service groups when you reboot as you want the service kept available, then the service group may offline successfully on the node and then the node shuts down, but then fail to start on the 2nd node, so now your service is not available and you can't switch back to the node it was originally on as the node is rebooting.

Mike

Rayson_Wong
Level 3

I think what Edward means is that there is situation that he need to shutdown both servers (with service outage), possibly due to hardware issue or so.

In this case, should the VCS be shutdown manually before shutdown the servers?

This is also my question as I am not able to find any reference on shutdown the whole cluster for VCS on Windows.

Rayson

mikebounds
Level 6
Partner Accredited

I'll try to make it more clear:

If you shutdown the servers you should offline all the service groups first by using GUI or from CLI using:

 hagrp -offline service_group -any

for each service group

It is not necessary to stop VCS, i.e you don't need to stop VCS service in services manager, or use "net stop had" or "hastop -all".  You could stop VCS as an alternative to offlining SGs as stopping the VCS service will put VCS in a "leaving state" and offline all the service groups for you and then stop the service and this will work most of the time, however if a VCS resource gets stuck in a transitional state, then you can't use any hagrp commands, particularly "hagrp -flush" in a "leaving state" which is why I recommend manually offlining service groups.

Also, if you just shutdown both servers roughly at the same time, without doing anything in VCS first then most times this will work if a resource does not get stuck in a transitional state or there is not too much delay between shutting down both servers so that VCS does not have change to failover services on to the other node.

So in short, my recommendation is to stop all service groups first, but if you don't, VCS will still cleanly shutdown properly in MOST instances.

Mike

jstucki
Level 4

Hi Mike,

Thanks for your comments on this topic.  Years ago, I had a discussion on this topic where I was informed of information as follows:    Windows servers/systems don't have an orderly shutdown mechanism (like UNIX and Linux RC scripts), where specific services and processes are shutdown before other services and processes (dependencies) are shut down.  So if you issue a shutdown command on a Windows system, the system essentially starts shutting down all the services and processes at the same time......which doesn't do well with VCS....where VCS would prefer to orderly switch the service groups over to a remaining node in the cluster, or, if there is not a remaining node in the cluster, just offline the service groups gracefully.

So I was instructed to manually offline (or switch) all the groups from that system, before I issued the shutdown command for the system.

Does this logic still hold true today?  Is this still the reason why we prefer offlining/switching the service groups before shutting down the Windows system?

-John

mikebounds
Level 6
Partner Accredited

Thanks John,

I wasn't aware that Windows shuts down its services in parallel, rather than satisfying dependencies, but I guess this means, if a server is rebooted/shutdown, then services are not shutdown any differently as to if application was not under VCS control.  The reason I gave for offlining service groups manually, is to:

Stop service groups failing over and trying to start on the other node if that is not what you want to happen

OR

Make sure service groups successfully switch to alternative nodes when rebooting one node, to make sure your service is available on other nodes before taking down a server.

But from what you say, you could say that you should offline service groups so that services and components shutdown down in the same order they are started up, but I doubt this bothers any Windows Adminstrators - i.e I have never known a Windows Administrator to shutdown down services first before rebooting a non-VCS node.  

Mike