With Azure Resource Manager, while I have talked about OS disks and data disks,
these are not actual constructs. Instead, they are just page BLOBs and are disks only
in terms of their relationship with an Azure VM. Therefore, configurations (such as
changing cache information of the size of disks) are performed through the actual
Azure RM VM object that is using the page BLOB as a VHD. The first step is to retrieve
the VM object that has the disk connected:
$vm = Get-AzureRmVM -ResourceGroupName RGEastUSMinecraft -Name VMEastUSMine
Once you have an object to the VM, the OS and data disks can be enumerated through
the StorageProfile model property. The OS disk is OsDisk, and the data disks are in
the DataDisks[] array. For example, this sets Read and Write caching on the OS disk
and no caching on the first two data disks (which are the defaults anyway). Once these
changes are made, the VM object must be updated for the changes to take effect.
$vm.StorageProfile.OsDisk.Caching = 'ReadWrite'
$vm.StorageProfile.DataDisks[0].Caching = 'None'
$vm.StorageProfile.DataDisks[1].Caching = 'None'
Update-AzureRmVM -ResourceGroupName RGEastUSMinecraft -VM $vm
The number of disks that can be attached to a virtual machine varies depending on the
size of the virtual machine, as shown earlier in Table 12.1. The full specifications for
all VMs is listed at https://azure.microsoft.com/en-us/documentation/articles/
virtual-machines-windows-sizes/, with the most being 64 with the G5. Suppose that
you add 16 disks, 1TB in size, to a virtual machine. You will have 16 separate disks in
the virtual machine. But what if you want an actual 16TB volume? The Windows
operating system has the ability to create striped volumes that effectively join
multiple disks together by creating a simple Storage Space. Make sure that you select
the Quick Format option to minimize the time to format and keep the sparse nature of
the underlying Azure Storage. Once it’s created, you will have a single volume of 16TB
that can be used, which has not only aggregated the size but also the IOPS, creating an
8,000 IOPS disk. For Linux operating systems, you can use the MD capability or LVM
to get the stripe. You don’t need to use any kind of RAID, such as mirroring or parity,
because each disk is already fault-tolerant through the three copies stored in the
Microsoft Azure datacenter.
Regular Azure Storage provides a maximum of 500 IOPs per disk, but that is not
guaranteed. The actual IOPS delivered may be slightly less, depending on other
workloads on the compute and storage stamps. An Azure Premium Storage offering is
also available and differs in three key ways:
You are billed based on the size of the disk and not data written. Therefore, from a
billing perspective, it is not sparse storage.
There are various disk size options that have different amounts of IOPS.
The IOPS delivered are predictable and will be the amount specified.
As an example at the time of this writing, Premium Storage disks come in three sizes,