Go to Windows Azure Storage Services-Premium storage

Source: Internet
Author: User

In our previous article, we used the storage service for Windows Azure as a network disk, and we continue to tap the storage service for Windows Azure-premium storage. Premium storage is naturally bigger than normal storage, because premium storage is SSD storage! Its throughput and IOPS are naturally not comparable to normal storage. Before the advanced Storage Power service was launched, users typically needed to mount multiple persistent disks for RAID use in order to improve disk performance. A maximum number of virtual machines can mount up to 16 persistent disks, if the 16 disks are composed of RAID 0, theoretically the overall disk performance can be increased by 16 times times-This is only theoretical value, because it is soft raid, always consumes some computing resources.

If the customer's application scenario has high disk performance requirements, such as: high-frequency database reading and writing, large file processing, and so on, the advantages of advanced storage is very obvious. Speaking of which, we have to mention the D-series virtual machines. Many users mistakenly think that the D-series virtual machines use SSD storage, why do they need premium storage? Yes, the D-Series virtual machines do use SSD storage, but the SSD storage used by D-Series virtual machines is just instance-level storage, which is a temporary disk. If the virtual machine is closed (released) and then reopened, or the migration is performed due to a hardware failure, the data on the temporary disk must not exist. Therefore, SSD temporary disks (instance-level storage) on a D-series virtual machine are ideal for storing temporary files during system operation-as a temporary directory for the operating system or application, such as the temp directory for Windows server, the swap partition for Linux, and so on. Whether it's a-series virtual machine or a D-series virtual machine, the temporary disk (instance-level storage) that comes with it is free of charge. The persistent disk is charged to the storage capacity.

Since premium storage is a persistent disk that is used to hold virtual machines (and is currently available only for virtual machine persistent disks, that is, page blobs), it is not natural to be free, and its price is much higher than normal storage. It is also critical that the virtual machine persistence disk on premium storage is billed according to the allocated capacity, for example: The user creates a 128G premium storage persistence disk, and the monthly price is fixed regardless of how much data the user actually stores on it; Even if a user creates a 1TB normal storage persistent disk, but only stores 10G data on it, the monthly price is calculated according to 10G. Well, a penny a penny, good goods are not cheap.

Currently, advanced storage services for Windows Azure can only be used in East China (Shanghai), because the Chinese version of Windows Azure does not yet provide a new version of the Web Management console, so you can only configure and use premium storage through PowerShell. Includes creating virtual machines that use premium storage. Get ready for the all-purpose PowerShell, start your work ~ ~

First we create a premium storage account, and since only the eastern China can now provide premium storage services, the [-location] parameter can only be set to "Chinese East".

" China East " " Premium_lrs

The next step is to set up the current storage account for the created premium storage account so that the virtual machine can be created later based on the current storage account. This step is critical, and Microsoft's official documentation misses this step, causing the subsequent steps to create the virtual machine to fail to execute smoothly.

Set-azuresubscription-currentstorageaccountname [Premium Storage account name]-subscriptionid [subscription ID]

After these two steps, the premium storage account is ready. However, it is not impossible to create a virtual machine to a premium storage account from the Web Management console. Go on, PowerShell.

$storageAccount = "[Premium storage account name]"
$vmName = "[Virtual machine name]"
$serviceName = "[Cloud service Name]"
$imageName = "[Virtual machine image name]"
$location = "China East"
$vmSize = "[DS Series Virtual machines]"
$OSDiskPath = "https://" + "[Premium Storage Account name]" + ". blob.core.chinacloudapi.cn/vhds/" + "[operating system disk filename].VHD]
$adminUsername = "[Administrator name]"
$adminPassword = "[Admin password]"

#创建Windows虚拟机

New-azurequickvm-imagename $imageName-medialocation $OSDiskPath-windows-instancesize $vmSize-servicename $ Servicename-name $vmName-adminusername $adminUsername-password $adminPassword-location $location

#创建Linux虚拟机

New-azurequickvm-imagename $imageName-medialocation $OSDiskPath-linux-instancesize $vmSize-servicename $ Servicename-name $vmName-linuxuser $adminUsername-password $adminPassword-location $location

This code is very long, let's read it:

    • $vmSize, neither the A-series nor the D-series, but the DS series, only the DS series of virtual machines can use premium storage. The configuration of the DS series virtual machines corresponds to the D-series one by one. For example: DS1 CPU cores, memory capacity and D1 are the same. The size description rule is similar to the D-series virtual machine, for example: "Standard_ds2".
    • $location, before the opening of advanced storage services in northern China, it could only be the "Chinese East".
    • $imageName, using [Get-azurevmimage | Select-object {$_. ImageName}] command to find the name of the virtual machine image you want to use.
    • $OSDiskPath, is a path to the VHD file in the premium storage account, which specifies the storage path of the virtual machine system disk.

When the PowerShell command to create a virtual machine returns correctly, the virtual machine creation action is not actually completed. The status of newly created virtual machines can be viewed through the Web Management console. The virtual machine is not available until it is "Running", that is, you cannot log on remotely or perform subsequent disk mount operations.

When the virtual machine is created (the status becomes "Running"), we can continue to create and attach a persistent disk to the virtual machine.

#获取虚拟机实例的引用
$VM=get-azurevm-servicename [Cloud service name]-Name [virtual machine name]
#指定持久盘的存储位置$dataDiskPath="https://"+"[Premium Storage account name]"+". blob.core.chinacloudapi.cn/vhds/"+"[Persistent disk filename].vhd"
#指定持久盘的描述标签
$dataDiskLabel="[Persistent disk description label]"
#指定Lun号, if there is only one persistent disk, the value is 1, and if there are multiple persistent disks, specify a different LUN number for each persistent disk. $LunNo= 1#创建高级存储持久盘并附加到虚拟机. The range of [persistent disk capacity] is: 128,512,1024, which is a premium storage persistence disk that corresponds to three different capacities.
Add-azuredatadisk-createnew-medialocation $dataDiskPath-DISKSIZEINGB [Persistent disk capacity]-disklabel $dataDiskLabel-lun $LunNo- Hostcaching READONLY-VM $VM | Update-azurevm

As with normal storage, you can further improve overall disk performance by attaching multiple persistent disks and creating RAID% if the user believes that the persistent disk performance of a single premium storage is still insufficient. In theory, you can configure a virtual machine's disk to 50000 IOPS, which is enough to give Windows Azure the edge over other competitors!

Finally, let's talk about some of the limitations and considerations for Windows Azure Premium Storage:

    • Premium storage accounts cannot be managed through the Web console. Although the name of the premium storage account can be listed on the Web console, that's it.
    • Place the DS-series virtual machines in a separate cloud service and do not mix with non-DS series virtual machines.
    • Premium storage is available only for virtual machine disks (System disks and persistent disks) and cannot be used as BLOB storage and file service.
    • Reasonably estimate the capacity of the premium storage persistent disk and choose the appropriate disk size to avoid unnecessary waste.
    • You cannot use PowerShell to view the VHD files that are stored on the premium storage account. However, you can copy a VHD file to a premium storage account via azcopy or start-azurestorageblobcopy or copy the VHD file from the premium storage account.

So far, we have been able to use the Windows Azure Premium storage services successfully, and we hope that users in northern China will also be able to use premium storage services as soon as possible.

Go to Windows Azure Storage Services-Premium storage

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.