Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Safe to issue Stop-ClusterNode?

Status
Not open for further replies.

mrmovie

Technical User
Oct 2, 2002
3,094
GB
I am looking for a set of pre patching commands to issue on Cluster Nodes.
I roughly have:

+ Import-Module FailOverClusters
+ Test-IsRequired (Get-ClusterNode -Name $ENV.ComputerName).State.ToString() Up
+ Suspend-ClusterNode $ENV:ComputerName
+ Stop-ClusterNode $ENV:ComputerName

i need to add some sort of check before doing the 'Stop-Cluster', otherwise i risk killing the cluster if the 'Quorum Configuration' is saying (GUI) "Node Majority – Warning: Failure of a node will cause the cluster to fail".

any idea of how i get this type of check included? somethign which resulted in a boolean would be good, such as Safe-To-Stop

I Hear, I Forget
I See, I Remember
I Do, I Understand

Ronald McDonald
 
thanks 58niper,
not going to work for me. some clusters dont have a quorum. I must state that i am considering w2k8 servers.
but, continuing on your theme, if i check the ClusterResource's in a cluster which is showing 'Failure of a node will cause the cluster to fail', i am getting State of Online for all Resources, nothing is showing me or hinting to me that if i take the node offline i will bring the cluster down

I Hear, I Forget
I See, I Remember
I Do, I Understand

Ronald McDonald
 
i could of course:
$intPossibleVotes = 0
$intPossibleVotes = $ClusterNodes.Count
$intPossibleVotes = $intPossibleVotes + $OtherWitnesses?.Count
$intVotes = 0
$intVotes = $ClusterNodes.Active.Count
$intVotes = $intVotes + $OtherWitnesses?.Active.Count
If ($intVotes - 1) -lt (($intPossibleVotes / 2) + 1 ){
Write-Host "you shouldnt take down this node..."
}

#but i just want to check something nice, that MS can give me already, they are working it out as they couldnt display the message otherwise

I Hear, I Forget
I See, I Remember
I Do, I Understand

Ronald McDonald
 
i agree about cluster.exe not using powershell in the background. perhaps i should refer to cluster.exe commands and see if that will give me anything better.
thanks for the replies 58sniper, have a good weekend

I Hear, I Forget
I See, I Remember
I Do, I Understand

Ronald McDonald
 
Yeah, I remember when I was first learning PowerShell I was doing some stuff with cluster.exe. Take a look at my blog post: Cluster administration from PowerShell and the infamous back tick.

I'm still moving the content over to that blog from another site, but the content for that post should be good.

Do you have your Tek-Tips.com swag? I've got mine! Pick some up at
Stop by the new Tek-Tips group at LinkedIn.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top