Here is the general information :

  • I created and attached standard SSD datadisk on the creation of the ubuntu VM.
  • Aplication files were on the datadisk.
  • I mounted datadisk following this tutorial except one difference : mounting disk on the $HOME/datadrive/ instead of /datadrive.

Then :

  • I resized Azure Linux VM size from B1s (1GB RAM) to B1ms (2GB RAM).
  • Server is restarted as expected.
  • After connecting via shh and listing content of the ~/datadrive, I realized that all the data is lost.

Is it because of the mounting under the home directory?

What should I do to not experience data lost in the disk again?

This is not anwering my question.

Edit :

Here is the content of /etc/fstab :

# CLOUD_IMG: This file was created/modified by the Cloud Image build process
UUID=bdf328db-9606-49ba-8e44-5e1299ae56f0   /    ext4   defaults,discard0 0
UUID=54D1-0F3A  /boot/efi   vfat    defaults,discard    0 0

UUID=b08e9d03-eec1-4517-b09c-b349e7791923   /datadrive   xfs   defaults,nofail   1 
/dev/disk/cloud/azure_resource-part1    /mnt    auto    defaults,nofail,x-systemd.requires=cloud-init.service,comment=cloudconfig   0   2
  • 1
    Please edit your question to add your /etc/fstab and the relevant logs from /var/log. – kubanczyk Feb 20 at 10:27

I solved the issue month ago but forgot the posting about it. Sorry for inconvenience who faces the same problem.

I couldn't understand the very details, but he issue was about mounting. I remounted the disk, and recovered the data.

Not the answer you're looking for? Browse other questions tagged or ask your own question.