[pve-devel] [PATCH-SERIES v3 pve-storage/qemu-server/pve-qemu] add external qcow2 snapshot support

DERUMIER, Alexandre alexandre.derumier at groupe-cyllene.com
Mon Jan 13 12:58:04 CET 2025



>>For almost all QMP commands, we only need to care about the node
>>that's
>>inserted for the drive.
(yes, that the throttle group in my implementation, and I have a fixed
name, I'm reusing the "drive-(ide|scsi|virtio)x naming"

>>And for your use-case, checking that the top
>>node of the chain matches what we expect is already a good first
>>step.
>>The lookup itself is a different question, I'll also answer to the
>>other
>>mail.


Maybe this could help to understand the problem:

Here a small resume of the 2 workflow, snapshot && block mirror,
where we have a switch between nodes:



snapshot
--------
--------
a) renaming current
--------------------
  
1)
device--->throttle-group--->fmt-node1----->file-node1 ----> vm-100-
disk-0.qcow2
  

2) create a new file node with new file name

device--->throttle-group--->fmt-node1----->file-node1 ----> vm-100-
disk-0.qcow2

file-node2 --> vm-100-disk-0-snap1.qcow2



3) switch the file node with blockdev-reopen

device--->throttle-group--->fmt-node1----->file-node2 ---> vm-100-disk-
0-snap1.qcow2
file-node1 --> vm-100-disk-0.qcow2


4) delete the old filenode
  
device--->throttle-group--->fmt-node1----->file-node2 ---> vm-100-disk-
0-snap1.qcow2
  
  
  
b) create the new current
-------------------------
1) add a new fmt node 

device--->throttle-group--->fmt-node1----->file-node2 ---> vm-100-disk-
0-snap1.qcow2

fmt-node3----->file-node3----->vm-100-disk-0.qcow2


2) blockdev-snapshot -> set fmt-node3 active with fmt-node1 as backing

device--->throttle-group--->fmt-node3----->file-node3----->vm-100-disk-
0.qcow2
                               |
                               |--> fmt-node1----->file-node2 ---> vm-
100-disk-0-snap1.qcow2
                               
                               


mirror
--------
--------
1) 
device--->throttle-group--->fmt-node1----->file-node1 ----> vm-100-
disk-0.qcow2


2) add a new target fmt + file node

device--->throttle-group--->fmt-node1----->file-node1 ----> vm-100-
disk-0.qcow2

fmt-node2----->file-node2 ----> vm-100-disk-1.qcow2 


3) blockdev-mirror (mirror + switch the fmt node on complete)

device--->throttle-group--->fmt-node2----->file-node2 ----> vm-100-
disk-1.qcow2 

fmt-node1----->file-node1 ----> vm-100-disk-0.qcow2


4) delete the old fmt+file node

device--->throttle-group--->fmt-node2----->file-node2 ----> vm-100-
disk-1.qcow2 


More information about the pve-devel mailing list