Our website use cookies to improve and personalise your experience and to display advertisements (if any). Our website may also include cookies from third parties like Google Adsense, Google Analytics, Youtube. By using the website, you consent to the use of cookies.

Blog Post

Azure IaaS Virtual Machines Temporary Drives

I’ve seen many posts on forums asking for more detail on the temporary disks assigned to Azure IaaS Windows and Linux VMs so here is a quick post explaining what they are.

When you create a VM either in the portal or command line utilities (i.e. PowerShell) you automatically receive an additional drive or mount point which is available for you to use at no additional cost for storage or transactions.  The primarily use case is to provide faster storage (IOPS and Latency) but although this sounds great it isn’t to be used for any data that you wish to keep.

You typically store temporary data on these drives like Windows page files and Linux Swap files or even SQL TempDBs.  As you can see from the images below it is represented on Windows as the “D” Drive and in Linux “/dev/sdb1” and mounted as “mnt”.

Windows VM

 

 

Linux VM

 

 

 

 

Now looking at the nuts and bolts of these drives you can see from the image below that the temp drive is locally connected to the physical host your VM is running on.  Given this key fact, the data will become inaccessible and basically lost forever if any of the following conditions occur: –

  • Resize your VM
  • Shutdown or Restart your VM
  • VM is moved to a different host (due to service healing, shutdown and restart) due to hardware failure

So, people please make sure you only store data that you are prepared to lose.

When the above conditions happen your VM will be recreated on a new host using the OS disk (and datadisks) 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.

(Image courtesy of Microsoft)

 

 

 

 

Typically the amount of temporary storage is based on the VM size allocated, so for example an A6 series VM will have 285GB and the A7 605GB available. To see more sizes please refer to the Azure Virtual Machines documentation.

Hopefully this helps your understanding 😊

One Comment

Comments are closed.

Related Posts