Restarting a service ... clustered

by Lahru at 2013-05-03 12:21:24

We have a service that needs to run for an application that imports files into the app every 1 minute.
Sometimes the service hangs, yet it’s status remains “running”.
I’m writing a script that will look into a high usage directory at files and see if their LastWriteTime is older than a given number of TotalMinutes.
IF the difference is exceeded it will then restart the service.
Normally I would think that I can run this script on the server itself as a scheduled task and the Restart-Service CMDlet would be sufficient to get things running again if there is a problem.
Whenever this service has had a problem in the past we manually restarted it and things would be OK. (Until the next time ;p .)
But this service is also a clustered resource “Generic Service” .

If I run stop-service on it I can see it stop in Services.msc and watch it go offline in the CluAdmin. If I use restart-service … it either does nothing or happens so fast I see nothing.

I don’t want to cause problems with the cluster by restarting a clustered resource with this CMDlet if I should use something else.
Is there a special way I should be restarting this service because it IS clustered?
by DonJ at 2013-05-04 08:46:12
It depends a LOT on how your cluster is set up. Generally speaking, so long as the cluster is still sending a heartbeat to other nodes, you can stop/start stuff without causing a failover. But, as I said, it depends a LOT on how the cluster is configured - without digging into that configuration, nobody can give you a for-certain answer.