8

Created a Standard DS1 virtual machine in Azure. It is supposed to have a 7GB SSD disk which is mounted on /mnt.

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        29G  1.5G   27G   6% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            1.7G  8.0K  1.7G   1% /dev
tmpfs           345M  392K  344M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            1.7G     0  1.7G   0% /run/shm
none            100M     0  100M   0% /run/user
none             64K     0   64K   0% /etc/network/interfaces.dynamic.d
/dev/sdb1       6.8G   16M  6.4G   1% /mnt

However, there is a warning placed into the /mnt location:

ls /mnt
cdrom  DATALOSS_WARNING_README.txt  lost+found
cat /mnt/DATALOSS_WARNING_README.txt 
WARNING: THIS IS A TEMPORARY DISK.

Any data stored on this drive is SUBJECT TO LOSS and THERE IS NO WAY TO
RECOVER IT.

Please do not use this disk for storing any personal or application data.

For additional details to please refer to the MSDN documentation at:
http://msdn.microsoft.com/en-us/library/windowsazure/jj672979.aspx

The link in the description leads to a resource that has been removed.

I've tried rebooting the virtual machine and data on /mnt seems to be persisted between reboots. I need to store persistent data on the SSD, is the warning accurate and can I expect data to be deleted from the /mnt partition? If so, what are my choices to have a persistant SSD disk on Azure virtual machine?

David Makogon
  • 69,407
  • 21
  • 141
  • 189
neo112
  • 1,703
  • 2
  • 17
  • 39

2 Answers2

6

You're looking at the local scratch disk. Yes it's SSD, but it's still a scratch disk. If that SSD crashes, your data is gone in an instant. If you resize your VM, you will likely lose what's on that disk. It's not a permanent-storage disk. If you want permanent storage, you must attach a disk, either from premium storage (SSD) or regular storage). Attached disks, just like the OS disk vhd, are stored in persistent blob storage.

David Makogon
  • 69,407
  • 21
  • 141
  • 189
  • yes, I was able to attach a disk following this tutorial: https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-how-to-attach-disk/ – neo112 Nov 12 '15 at 18:54
0

That is a temporary disk:

Most VMs contain a temporary disk, which is not a managed disk. The temporary disk provides short-term storage for applications and processes, and is intended to only store data such as page or swap files. Data on the temporary disk may be lost during a maintenance event or when you redeploy a VM. During a successful standard reboot of the VM, data on the temporary disk will persist. For more information about VMs without temporary disks, see Azure VM sizes with no local temporary disk.

https://learn.microsoft.com/en-us/azure/virtual-machines/managed-disks-overview#temporary-disk

Evandro Coan
  • 8,560
  • 11
  • 83
  • 144