Azure Shared Disks for Clustered Applications
Azure Shared Disks enables the next wave of block storage workloads migrating to the cloud including the most demanding enterprise applications, currently running on-premises on Storage Area Networks (SANs). These include clustered databases, parallel file systems, persistent containers, and machine learning applications. This unique capability enables customers to run latency-sensitive workloads, without compromising on well-known deployment patterns for fast failover and high availability.
With Azure Shared Disks, customers now have the flexibility to migrate their clustered environments running on Windows Servers This capability is designed to support SQL Server Failover Cluster Instances (FCI), Scale-out File Servers (SoFS), Remote Desktop Servers (RDS), and SAP ASCS/SCS running on Windows Server. Recently I was involved in a customer engagement to Lift & Shift their mission critical on-premise application to Azure and I had an opportunity to work on Azure Shared Disk to migrate their SQL Server FCI and SoFS clustered applications.
With that intro, let’s dive into setting up a Clustered Shared Volume on Windows Clustering using Azure Shared Disks.
Pre-requisites
- A valid Azure subscription
- Proximity Placement Group (optional)
Note: Pls note setting up Azure Shared Disk with Windows Clustering costs you some money so I wouldn’t recommend in a free subscription.
Setup Windows Failover Cluster with Azure Shared Disks
- Login to your Azure Subscription via CLI or PowerShell.
- Create a new Ultra Disk in your target region and resource group.
az disk create -g hpisuddenRG -n myshareddisk1 --size-gb 1024 -l eastus2 --sku UltraSSD_LRS --max-shares 5 --disk-iops-read-write 2000 --disk-mbps-read-write 200 --disk-iops-read-only 100 --disk-mbps-read-only 1 --zone 1
- An Ultra disk named “mysharedDisk1” will be provisioned in your target resource group.
- We need to create an Active Directory server or use an existing one. I wanted to start everything from scratch so I built an AD server and domain joined the virtual machines. There’s an ARM template available that creates an HA AD server in your target subscription. When you open the ARM template just click on “Deploy to Azure” and specify your subscription, target region, resource group etc.
- Create a Proximity Place Group
- To make it simple, let’s create two Windows 2016 Datacenter servers in the same resource group, VNet as your AD server. Pls make sure to provision these VMs in the proximity place group created in the above step. This is a pre-req to use Azure Shared Disks.
Note: When you are creating the VMs, set the Ultra Disk compatibility to true
- My AD VM(s) and Windows VMs are provisioned as shown below.
- Go to your VM >> Settings >> Disks>> Attach the shared disk that was created above to these Windows Server VMs
- RDP in to your VMs, open the “diskmgmt.msc” and follow this process to initialize and format these disks.
- Domain join your VMs. Creating the domain user and assigning the appropriate permissions are beyond the scope of this article.
- Let’s install the Failover-Clustering feature in your VMs. Open your PowerShell as an administrator and run the following commands.
Install-WindowsFeature -Name Failover-Clustering –IncludeManagementTools –ComputerName sharedvm1Install-WindowsFeature -Name Failover-Clustering –IncludeManagementTools –ComputerName sharedvm2
- Restart the VMs. Launch the failover cluster wizard, select the VMs and validate with running all tests
After validating the Cluster configuration, let’s create a cluster via Failover Cluster wizard or PowerShell. Prior to that, we need to create an Azure Standard Internal Load Balancer , (backend pool, health probe etc.) and add the VMs to the Internal Load Balancer’s backend pool. Pls set a static IP while creating the Standard ILB (e.g. 10.0.0.10)
- My Internal Load Balancer
- My ILB’s backend pool
- My ILB’s health probe
- Run the below Powershell command in one of the clustered nodes
New-Cluster -name kacluster1 -Node sharedvm1,sharedvm2 -StaticAddress 10.0.0.10The StaticAddress has to match with the Static IP of Internal Load Balancer created above.
- Once the Cluster is ready, right click on the “Cluster Disk” and select “Add to Cluster Shared Volumes” option. This disk will now be shown as CSV disk.
- Go to your VM’s file explorer, and check the C:\ClusterStorage
- Feel free to add/delete files and check the same in other VMs.
- To have a stable cluster, consider adding a Quorum. Right click on the cluster name >> More Actions/Configure Quorum settings
- Create an Azure Storage Account before hand, keep the account name and access key in hand.
Viola!!. Our Cluster is Online. You can deploy SQL Server FCI, File Servers etc..!!!
My sincere thanks to Azure Shared Disk Product Engg team for helping me as I go through this preview feature and making me successful in this POC.