Restore Removed Disk

sonuame

New Member
Mar 24, 2023
2
0
1
I had 2 hard drives connected to one of my VM and they have huge data in it.

I was trying to restore this VM from a backup as a part of routine Disaster Recovery Procedure, I found these 2 external disks weren't readable.
So I though I will remove and re-add them .

I clicked on "Remove" and A popup appeared that removing disc will erase the data.
I though why It will erase the data from the external drives. I clicked on OK and then it actually removed the data.

Now I tried to restore the data via recovery drives and I can see that all of my data is still there. Only the partition table is wiped out.
Can I restore the partition table now via proxmox and re-attach it in the VM.

Please Help,
 
Hi,
I was trying to restore this VM from a backup as a part of routine Disaster Recovery Procedure, I found these 2 external disks weren't readable.
Please share the output of pveversion -v and the VM configuration included in the backup. If the external disks are included in the backup, they should be added as virtual disks upon restore.

So I though I will remove and re-add them .

I clicked on "Remove" and A popup appeared that removing disc will erase the data.
I though why It will erase the data from the external drives. I clicked on OK and then it actually removed the data.
Are you sure these were still the external disks and not new virtual disks that got added during the restore?

Now I tried to restore the data via recovery drives and I can see that all of my data is still there. Only the partition table is wiped out.
Can I restore the partition table now via proxmox and re-attach it in the VM.
If the drives were attached via SATA, you might've ran into this bug and that's why the partition table got lost. You can use a tool like TestDisk to try and recover it: https://www.cgsecurity.org/wiki/TestDisk

Before that, could you provide a dump of the start of the disk with
Code:
qemu-img dd bs=512 count=256 if=/dev/sda of=/tmp/dump.raw
?

It's recommended to use VirtIO SCSI for best performance and robustness rather than IDE/SATA.
 
Thank you very much for the quick Response @fiona
I have sent the drive for data recovery now to a lab now.


I am using version 7.3-6
PVE 5.15.102-1

If the external disks are included in the backup, they should be added as virtual disks upon restore.
I excluded the external disks from backups. When I restored my debian vm from backup, these discs weren't automatically detected. They didn get mounted automatically. So I thought of removing and re-adding them.
Are you sure these were still the external disks and not new virtual disks that got added during the restore?

Yes they were external discs added into LVM showing as /dev/sda and /dev/sda on summary page
/dev/sdb is the external disc here


1679672498851.png



You can use a tool like TestDisk to try and recover it: https://www.cgsecurity.org/wiki/TestDisk
I will try this tool once I'll get the drive back.
Before that, could you provide a dump of the start of the disk with
Will check and update here.
 
I excluded the external disks from backups. When I restored my debian vm from backup, these discs weren't automatically detected.
Ok, if they were excluded from backup, they won't be restored as virtual disks. Can you still share the backed-up configuration (select the backup and click on Show Configuration)?

They didn get mounted automatically. So I thought of removing and re-adding them.
How exactly did you remove and re-add the disks?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!