Proper Shutdown of SQL Servers in a Cluster

  • I was just wondering what the best approach should be for shutting down an Active/Active Cluster where both nodes need to be shutdown for disk maintenance.

    I was thinking of this process:

    1. Open Failover Cluster Manager

    2. Right-click on the cluster name, select ‘More Actions’, then “Shut Down Cluster…”

    3. When prompted if you are sure you want to shut down the cluster, click “Yes”

    4. Shutdown both Nodes

    5. Do Disk Maintenance

    6. Power on both Nodes

    7. Fail Cluster resources back to their preferred node

    Does anyone see any issues with that? How do you ensure the Cluster Resources come back up on the correct node considering they'll come up at a different time?

  • Shutdown process:

    1.Other way You can stop the SQL Services on Node A, actually shutting down the cluster stops the SQL Services.

    2.Shut down the Node A

    3.Then Shut down the Node.

    Restart process:

    Always start one node at a time.

  • I would personally start with going into SQL Configuration Manager on each node and shut down the SQL services. This may not be necessary but it seems like a more controlled approach.

  • JeepHound (6/18/2014)


    I would personally start with going into SQL Configuration Manager on each node and shut down the SQL services. This may not be necessary but it seems like a more controlled approach.

    This is not the proper approach with a sql server cluster. The services should always be shut down/restarted using the cluster manager, not sql server configuration manager.

  • Can you provide more detail as to why this is?

  • It's something I learned, or was taught many years ago.

    Primarily if you are dealing with a cluster, everything should be done within the cluster manager since the cluster is monitoring the health. "old school" thought, although it appears that this has changed, is when you stop/start/restart outside of the cluster administrator, the cluster may think there was a problem, and then may fail the group over to the other node. From poking around some, that is not the case if you use Configuration Manager to stop the service from this link below. This probably still applies to 2008, 2012,2014.

    http://support.microsoft.com/kb/254321

    SQL Server 2005 supports starting and stopping SQL Server services by using any of the following tools:•Cluster Administrator

    •SQL Server Configuration Manager

    •SQL Server surface area configuration

    •SQL Server Management Studio

    Note Do not use the Services snap-in to stop a clustered instance of SQL Server. If you use the Services snap-in, the cluster service restarts SQL Server.

    I still subscribe to only using the cluster administrator to take the sql instance "offline"/"online". Your answer is technically correct.

    Brian Kelly thinks this is also best practice (using cluster admin):

    http://www.sqlservercentral.com/Forums/Topic12484-5-1.aspx

    Steve

  • Right-click on the cluster name, select ‘More Actions’, then “Shut Down Cluster…”

    You should use Cluster Manager, but instead of stopping the Cluster you should set the Cluster Groups to Offline. When all groups are offline you can shut down Windows. When you reboot you will have to put the groups Online. This stops the Cluster Groups moving to another node during your shutdown and restart process, and also allows you to shut down all nodes at the same time.

    Another alternative is to simply shut down Windows, without taking any other action prior to doing this. Wait until your first node has shutdown and the failover has completed before shutting down the next node, then continue with this until all nodes are shut down. When you reboot, all Cluster Groups will be active on the first node you boot, so you will have to use Cluster Manager to make the Cluster Groups active on your preferred nodes.

    Either way will work, but option 1 will probably get the job done faster.

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara

  • Thanks very much everyone.

  • PhilipC (6/18/2014)


    I was just wondering what the best approach should be for shutting down an Active/Active Cluster where both nodes need to be shutdown for disk maintenance.

    I was thinking of this process:

    1. Open Failover Cluster Manager

    2. Right-click on the cluster name, select ‘More Actions’, then “Shut Down Cluster…”

    3. When prompted if you are sure you want to shut down the cluster, click “Yes”

    4. Shutdown both Nodes

    5. Do Disk Maintenance

    6. Power on both Nodes

    7. Fail Cluster resources back to their preferred node

    Does anyone see any issues with that? How do you ensure the Cluster Resources come back up on the correct node considering they'll come up at a different time?

    To carry out disk maintenance simply take the clustered sql server service offline for a particular clustered role.

    Once the service is offline set the disk(s) in maintenance mode via the Failover Cluster Manager or via PowerShell using

    Suspend-ClusterResource -Name "the disk name"

    To exit maintenance mode use

    Resume-ClusterResource -Name "the disk name"

    To list the disk names if you're unsure use

    Get-ClusterResource | ?{$_.ResourceType -EQ "Physical Disk"} | ft Name, OwnerGroup

    EdVassie (6/23/2014)


    When all groups are offline you can shut down Windows. When you reboot you will have to put the groups Online. This stops the Cluster Groups moving to another node during your shutdown and restart process, and also allows you to shut down all nodes at the same time.

    No, it doesn't. The group will still move to a partner node, it will simply stay in the state you manually put it in. For example, i just set the sql serverice and agent for a role offline manually, its owned by node A and node B is a partner. I then restarted the server A and cluster manager shows the role partially online on the partner node B, disk volumes were present in windows.

    It's also the same when you stop the role completely, the ownership in cluster manager will still be transferred to a partner node.

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Thanks Perry, great idea 🙂

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply