[SOLVED] rollback snapshot excluding disks

JL17

Member
Aug 17, 2020
20
5
23
41
Hello, I have a VM with 3 virtual disk stored on the same lvmthin pool.
I have a snapshot of the entire VM and i want to rollback to that snap, but only´one disk, not all of them.
Is there a way to achieve this? (cloning or backing up the excluded disks is not an option)

Thanx in advance!
 
not via PVE interface, afaik. You will need to shutdown the VM, go behind the covers, ie to hypervisor shell and roll back that one disk via manual commands. Keep in mind that the consistency of your VM snapshot will be broken at that point. If you are satisfied with results you should remove the snapshot completely from from all disks, you may need to do a minor surgery on the VM config file.

My advice - test it on non-important data. Create new VM if needed.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: JL17
ok no problem with using shell and editing the config file, but i dont know the commands to rollback an individual disk.
can you help me with that?
 
I dont have step by step instructions for you. This is not a procedure I do monthly or even every six months. I'd have to google and try the same way you would to get the details.

You can reference what PVE does in this situation , ie https://github.com/proxmox/pve-storage/blob/master/PVE/Storage/LvmThinPlugin.pm#L337
Carefully use the same command and it should work.

Test before trying on important data.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: JL17
Thanx bbgeek! you pointed me in the right direction, I had to stop the VM, remove the original volume, renaming snap with same name as original and give it RW permissions.

I leave the commands that I used in case someone is in the same situation:

lvremove pve/vm-202-disk-0 lvrename pve/snap_vm-202-disk-0_oki pve/vm-202-disk-0 lvchange -p rw pve/vm-202-disk-0

Thanx again