Wednesday Tidbit: Using Cluster-Aware Updating to patch a Windows Server 2012 R2 Failover Cluster

20150820 - 1Recently I built a Windows Server 2012 R2 Failover Cluster to run my SQL, file services and Certificate Authority workloads. For a number of reasons (mentioned in the article) I decided to build it on the Server Core edition of Windows.

Whilst this offers numerous advantages, simplicity isn’t always one of them. One example of this is patching.

Patching a failover cluster is far from trivial at the best of times, and on Server Core this is even more apparent. Patches have to be downloaded, cluster resources migrated, nodes put into maintenance mode, patches installed etc etc. This is where Cluster-Aware Updating comes in.

To update a failover cluster running on Server Core that has the cluster Management Tools installed use the following. First, logon to one of the nodes and open PowerShell.  Then use the Invoke-CauRun cmdlet to install the updates:

Invoke-CauRun -ClusterName cluster -Force -CauPluginName Microsoft.WindowsUpdatePlugin -MaxRetriesPerNode 3 -CauPluginArguments @{ 'IncludeRecommendedUpdates' = 'False' } -EnableFirewallRules

In the above example, the cmdlet will connect to the cluster (cluster), call the Windows Update plugin, download the updates and install them.

If you want to start with a specific node (for example, cluster1), use:

Invoke-CauRun -ClusterName cluster -Force -NodeOrder @("CLUSTER1") -CauPluginName Microsoft.WindowsUpdatePlugin -MaxRetriesPerNode 3 -CauPluginArguments @{ 'IncludeRecommendedUpdates' = 'False' } -EnableFirewallRules

You can monitor the progress using the Cluster-Aware Updating tool which can be found in the Remote Server Administration Tools:

20150820 - 2

This will do the following:

  • Download the patches to both nodes
  • Put the first node into maintenance mode (pause it)
  • Apply the patches
  • Reboot
  • Bring the first node out of maintenance mode
  • Place the second node in maintenance mode
  • Apply the patches
  • Reboot the second node
  • Bring the second node out of maintenance mode

Each time a node is paused it will automatically migrate a cluster group to the other node(s).  If you have configured failback, these will be automatically migrated back to their assigned node when the updating is complete.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.