Understanding the temporary drive on Windows Azure Virtual Machines
When you create a VM in Windows Azure you are provided with a temporary storage automatically. This temporary storage is “D:” on a Windows VM and it is “/dev/sdb1” on a Linux VM.
This temporary storage must not be used to store data that you are not willing to lose.
Note: In any linux distro on Windows Azure, the sdb1 will be the temporary drive to be mounted. The mount point and directory mounted might be different between linux distros.
The temporary storage is present on the physical machine that is hosting your VM. Your VM can move to a different host at any point in time due to various reasons (hardware failure etc.). When this happens your VM will be recreated on the new host using the OS disk from your storage account. Any data saved on the previous temporary drive will not be migrated and you will be assigned a temporary drive on the new host.
What is the size of the temporary storage?
The temporary storage varies with size of the VM that you have selected. Below is the list of VM size and its corresponding temporary disk size.
|VM Size||Temporary Disk Size|
Temporary disk size may change in the future, always refer to this link for accurate information on the temporary drive size.
Is there any cost associated with temporary storage?
The temporary storage provided with each VM has no extra cost associated with it for storage space as well as for transactions.
What is the purpose of temporary storage?
This temporary storage is used to save the system paging file.
You can also use this drive only to store temporary data, which you can afford to lose at any time.
Like for example: If your workflow involves getting content from the blob, processing it and storing it back to the blob then you could download content to the temporary storage, process the content, then take the processed content and save it back to the blob.
Windows VM :
Note:Keep in mind the /dev/shm uses the swap file on /mnt/resources to do what on windows would be the pagefile.sys.
What is the IOPS for temporary storage?
This temporary storage drive is present on the physical machine which is hosting your VM and hence can have higher IOPS and lower latency when compared to the persistent storage like data disk.
When will the data on temporary drive be lost?
When you resize the VM, When you shutdown or restart your VM, when your VM is moved to a different host server(due to service healing, shutdown and restart), when the host is updated, when the host experiences a hardware failure etc.
Is there a way to recover data from the temporary drive?
There is no way to recover any data from the temporary drive.
What should I do to store data that I cannot afford to lose?
You can attach a data disk to the virtual machine to store data that you cannot afford to lose. OS disk and data disks are persistent storage. More information on data disks here.
So always remember not to store any important data on the temporary storage and use data disks for additional storage requirement.