After resizing Azure Linux VM, data in the attached datadisk is lost. Is it possible to recover?

Batuhan Tekmen 31 Reputation points
2021-02-20T09:06:29.73+00:00

I created Linux VM with attached 8GiB standard SSD datadisk (Not OS disk). Datadisk was mounted on the $HOME/datadrive. After resize operation of VM, data inside the data disk is gone.

There were no any cautions about it. Isn't the purpose of datadisks allow persisten data?

What can I do not to encounter same problem next time? Is it possible to recover lost data?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,479 questions
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
590 questions
{count} vote

Accepted answer
  1. Supratim Sircar 186 Reputation points
    2021-02-20T17:43:07.647+00:00

    If you had taken a backup of the vm, then you can restore that backup to a new azure vm using this guide:
    https://video2.skills-academy.com/en-us/azure/backup/backup-azure-restore-files-from-vm

    If the vm was not backed up, you can use the free GNU tool called Ddrescue to try to recover those files inside the disk.

    Some of the features of ddrescue:

    • Created to be fully automated
    • Data is rescued very efficiently (only the needed blocks are read).
    • Auto-merge data
    • Automatically highlights bad sectors on a hard disk
    • Backup-Recovery is resumable

    Here is a full guide on how to perform that too: https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html#Examples

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful