LUN Backup Restore - Restore VM

Sloanstar

Active Member
Apr 6, 2017
5
1
41
46
Hello, Running PVE 8.1
I have LVM backed iSCSI on Synology NAS with multiple machines on a 2TB LUN.

I do a LUN backup every other day. One of the machines, (id 121) lost some data.
I restored LUN2 to a different volume as LUN2-COPY, and I want to recover the disk for just VM 121 from the backup and copy it to the real LUN2.

I'm not sure where to start - should I add LUN2-COPY as an iscsi target and see if i can enumerate disks? not sure if it will conflict with existing machine IDs on the real LUN2.

Thanks in advance.
 
Hi @Sloanstar ,
It seems that your backup was outside of PVE? If it was, then your approach of mapping the LUN to a new or existing iSCSI target is correct.
I do think you will see an LVM ID conflict, but its possible to overcome this with a few careful commands.

You could also create a new iSCSI target and map it inside the VM, this will isolate your production host and you'd be able to access/copy data inside the VM safely.

Hope this helps.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
@bbgeek17 - Yes the backup was on the storage array of the LUN itself, outside of PVE. I like the idea of exposing the LUN inside a vm, but i'm not sure what i would see since it's a bunch of block storage disks... would it even show file names for the disks so i could copy it out - like a .vmdk?

It might be more feasible to add the LUN2-COPY to the cluster and use the storage explorer?
 
but i'm not sure what i would see
All the more reasons not to do it on production server.
since it's a bunch of block storage disks
So you had a simple "iscsi>lvm VG>lvm LV" implementation? In this case you should be able to "pvs/vgs/lvs" see your slices, you'd then mount them to some temporary mount and be able to access the file system.

would it even show file names for the disks so i could copy it out - like a .vmdk?
No, there are no files or names. Although, pedantically - everything in Linux is a file.
It might be more feasible to add the LUN2-COPY to the cluster and use the storage explorer?
There is no such thing as a "storage explorer". If you attach a duplicate LUN to the host that sees the original, you will have to overcome LVM ID conflicts, then potentially FS ID conflicts, then you'd mount the individual LVM slice and access the data.

Good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
Thanks, this was actually much easier than I anticipated. I stood up a new debain box and opened the iscsi target on it. Once connected the pcs/vgs/lvs tools "just worked" as you said.

I mounted the disk to a folder and was able to pull back some data that had been inadvertently deleted.

Thanks so much for the help.
 
  • Like
Reactions: Kingneutron

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!