What is Cloud Witness?
Cloud Witness is a new type of Failover Witness Quorum Witness that uses Microsoft Azure blob storage to read/write a blob file which is then used as an arbitration point in case of split-brain resolution. There are significant benefits with using a Cloud Witness.
- Uses Microsoft Azure. (No need for a 3rd host or 3rd datacenter.)
- Uses Microsoft Azure Blob Storage. (No need for a VM hosted in Microsoft Azure, Saves on maintenance overhead.)
- The same Microsoft Storage Account can be used for multiple clusters. (One blob file per cluster.)
- Very Low cost to the storage account. (Data is only written to a small blob file, blob file only updated when cluster nodes change state.)
- Built into Microsoft Server 2016 Failover Clustering.
In this guide, I am going to create a new Microsoft Azure Cloud Witness for my two node test lab.
As you can see no 3rd node is required. The Cloud Witness, like any other quorum witness, gets a vote and can participate in quorum calculations.
Create a storage account.
For Cloud witness to work we need a Storage account in Microsoft Azure. You can always use an existing Storage account, but I have chosen to create a new one to keep things tidy.
Log in to your Azure subscription via http://portal.azure.com.
Click the green + and look for storage.
Click Storage account.
Give your new Storage account a unique name.
Select General Purpose for Account kind.
Select Standard for Performance type.
Select Locally-redundant storage (LRS) for Replication. This is very important and needs to be LRS.
Select Hot for Access tier.
Select Disabled for Storage service encryption.
Choose your Subscription.
You can either use an existing Resource group, or you can Create a new one.
Select a location closest to you.
The cloud account has now been created.
For our Failover Cluster to be able to use your new Storage account for its Cloud Witness we need to get our Storage accounts Access Keys.
In Azure, find your storage account you want to use for Cloud Witness.
Click Storage account.
In the new Blade, Click Access Keys.
Take a note of the Storage account name.
Copy key1 to the clipboard.
You now have your Storage account key ready to finish off creating the Cloud Witness.
Setup Cloud Witness.
On server go to failover cluster manager.
Right click the Cluster.
Navigate to More actions > Configure Cluster Quorum Settings…
Click Select the quorum witness.
Select configure cloud witness.
Enter Azure storage account name and past key1 into Azure storage account key.
Verify the message and click Next.
You have now created a Cloud Witness and your cluster will now be able to handle one node failure.
Once you have created the storage account in Microsoft Azure. You can use powershell to configure the Failover Cluster. Just use the following Code, change the storageAccountName and StorageAccountAccessKey as needed.
|Set-ClusterQuorum -CloudWitness -AccountName <storageAccountName> -AccessKey <StorageAccountAccessKey>|