Special thanks to our WATS Linux experts- Joao Madureira, Vittorio Franco Libertucci and Patrick Catuncan for reviewing this post.
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.
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.
Temporary Disk Size
Temporary disk size may change in the future, always refer to this link for accurate information on the temporary drive size.
The temporary storage provided with each VM has no extra cost associated with it for storage space as well as for transactions.
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.
Reference for /dev/shm
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 you resize the VM, when your VM is moved to a different host server, when the host is updated, when the host experiences a hardware failure etc.
There is no way to recover any data from the temporary drive.
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.