?
Solved

Stopping/Starting services on a cluster through a command line

Posted on 2006-04-27
3
Medium Priority
?
236 Views
Last Modified: 2010-04-18
I need to write a simple batch file to copy some files from a cluster to another machine.  Before these files can be copied, a service needs to be stopped.  (I'll then need to re-start the service after the file copy).

If I just use the usual net stop command, the service will just fail over to the other node, correct?  If that happens, then the files I need to copy will still be locked.

Is there a command that I can use instead of net stop?  Something specific to shutting down a service on a cluster?
0
Comment
Question by:dsdonut
  • 2
3 Comments
 
LVL 97

Expert Comment

by:Lee W, MVP
ID: 16555763
the command line control for a Windows Cluster is quite extensive.  Review this link for a much more detailed description of all the capabilities available:
http://technet2.microsoft.com/WindowsServer/en/Library/62513114-6281-4119-8a65-6463be5646a61033.mspx
0
 
LVL 85

Accepted Solution

by:
oBdA earned 500 total points
ID: 16569578
You need to take the service resource offline; this will stop the service. Then copy your files, and bring the resource online again.
The command to stop the service should be
cluster.exe /cluster:YourClusterName resource YourServiceResourceName /offline
and to start it again
cluster.exe /cluster:YourClusterName resource YourServiceResourceName /online
Depending on how fast the service is doing the starting or stopping, you might have to add a "/wait:TimeOut"; default is 10 seconds.
0
 
LVL 97

Expert Comment

by:Lee W, MVP
ID: 16694278
Wow... so I provide an indepth link to how to use the cluster command line and get nothing for it... oh well...
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I guess it is not common knowledge to most Wintel engineers/administrators: If you have an SNMP-based monitoring system in your environment (and it's common to have SNMP or Syslog) it's reasonably easy to enable monitoring of the Windows Event logs,…
Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question