Single Data Disks — Up To 4TB With Azure Virtual Machines
Microsoft recently launched a preview of disks up to 4TB in size in Azure. I will explain the benefits of this offering and show you how to deploy these disks.
Max Disk Size of 1023GB
One of the common gripes for people working with Microsoft Azure infrastructure services is that virtual machine hard disks are limited to a maximum size of 1023GB. This is just under 1TB or technically 1TiB or 1024GiB thanks to the marketing corruption of computer science.
There were two sources of complaints. Some customers wanted data volumes in their Azure virtual machines that could be larger than 1TB. Maximum disk size never stopped on-premises servers from having bigger volumes. We just aggregated the capacity and performance of multiple disks to create larger volumes. We can do the same with data disks in Azure virtual machines using Storage Spaces. This applies to the use of Windows Server machines. The result is a larger volume and multiples of the potential performance of a single data disk. This is what we call a win-win.
There are some cases where a customer needs very large volumes but performance is not an issue. Let’s imagine a customer that needs a relatively slow machine with 16TB of storage. With 1023GB disks, I need a machine that supports at least 16 data disks, such as an A8_v2. This costs around $305 per month. If I could deploy 4TB data disks, then I would only need an A2_v2. This is more affordable at around $75 per month. Prices are RRP for the East US region.
The more interesting scenario is disaster recovery replication using Azure Site Recovery. This solution creates VHD disks in Azure from the customer’s virtual hard disks, such as vSphere and Hyper-V, or LUNs, such as physical machines. If a customer has a data volume that is larger than 1023GB, then there is a problem. I have had to advise people many times that they would need to recreate the data disk of an on-premises virtual machine to use a single Storage Spaces virtual disk. This is created from multiple 1023GB VMDK or VHD files and that never goes well! With native support for 4TB data disks, Azure would solve this problem for the vast majority of those that are affected. Data volumes up to 4TB could be replicated without any re-engineering or Storage Spaces.
Preview of 4TB Disks
Microsoft launched a preview of 4TB managed disks at the Build conference. At the time of writing this article, the preview was limited:
- Only the East US 2 region was enabled for this improvement. Microsoft announced that an expansion to other regions would take place in June.
- The disks had to be created using PowerShell. More on this later.
These are managed disks so that means there will be new price bands, 2TB and 4TB, for Standard and Premium disks. Premium disks are flash based. A trait of flash storage is that the bigger the file, the better the performance. A 4TB Premium hard disk is expected to offer up to 7,000 IOPS. The current 1024GB P30 disk offers up to 5,000 IOPS.
Note that the Azure Portal shows an incorrect speed of 500 IOPS for 4TB Premium disks at this time.
Creating a 4TB Disk
At the time of writing, the option to create a 4TB disk was not in the Azure Portal. PowerShell had to be used. This requires 2 cmdlets. First, we build a disk configuration that is stored in a variable called $DiskConfig, specifying the region of choice, the size with max of 4095GB, the type (StandardLRS or PremiumLRS), the OS type, and how the disk contents should be populated.
$DiskConfig = New-AzureRmDiskConfig -Location 'East US 2' -DiskSizeGB 4095 -AccountType StandardLRS -OsType Windows -CreateOption Empty
Next, we send the disk configuration to Azure to build the new disk. A blob or file name and resource group are specified. Note that we do not specify a storage account because this is a managed disk. Azure handles the storage of the VHD blob.
New-AzureRmDisk -ResourceGroupName 'rg-test' -DiskName 'vm-test-01-data1' -Disk $DiskConfig
A few moments later, a new disk is ready to attach.
Attaching the 4TB Disk
Once the disk is created, you can add it to a virtual machine that has been configured to use managed disks. Note that you can convert virtual machines to use managed disks with not much more than a reboot.
Open the Azure Portal, browse to the virtual machine, and select Disks. Click + Add Data Disk. Expand the drop-down list box under Name and you should see any unattached managed disks, including your new disk. Select the disk, choose the form of host-based caching that the service in the virtual machine supports, and click Save.
Once you log in, bring the disk online and format it. You will have a data volume of 4TB in size using a single data disk.
More in Microsoft Azure
Microsoft Adds SSO and Passwordless Authentication Support to Azure Virtual Desktop
Sep 27, 2022 | Rabia Noureen
A Guide to Azure Certification
Sep 23, 2022 | Aidan Finn
What is Azure Data Factory?
Sep 9, 2022 | Sukesh Mudrakola
Microsoft's New Azure Managed Grafana Service Improves Data Visualizations
Sep 1, 2022 | Rabia Noureen
Microsoft is Investigating Azure Outage Affecting Ubuntu VMs
Aug 31, 2022 | Rabia Noureen
Microsoft's Arm-based Azure VMs with Ampere Altra Chips Are Now Generally Available
Aug 31, 2022 | Rabia Noureen
Most popular on petri