--- Begin Message ---
We have tried the steps mentioned here to create copy-before-write snapshot - 
https://www.mail-archive.com/qemu-devel@nongnu.org/msg876056.html

However, one of the commands 'blockdev-replace' fails with below error:
{"error": {"class": "CommandNotFound", "desc": "The command blockdev-replace 
has not been found"}}

Is the command available in any specific qemu version? Is there any other 
command that we should be using instead if blockdev-replace?

qemu version:
===========
root@be-proxmox1:/dev/pve# /usr/bin/qemu-system-x86_64 --version
QEMU emulator version 9.0.2 (pve-qemu-kvm_9.0.2-4)

pve version:
==========
root@be-proxmox1:/dev/pve# pveversion -v
proxmox-ve: 8.3.0 (running kernel: 6.8.12-4-pve)
pve-manager: 8.3.0 (running version: 8.3.0/c1689ccb1065a83b)

Thanks
Prashant

-----Original Message-----
From: Prashant Patil <prashant.gamepa...@veritas.com>
Sent: 17 March 2025 07:01 PM
To: Fiona Ebner <f.eb...@proxmox.com>; Proxmox VE development discussion 
<pve-devel@lists.proxmox.com>; Thomas Lamprecht <t.lampre...@proxmox.com>
Cc: Anuradha Joshi <anuradha.jo...@veritas.com>; Sudhir Subbarao 
<sudhir.subba...@veritas.com>; Jason Voneberstein 
<jason.voneberst...@veritas.com>
Subject: RE: [pve-devel] About PVE Backup Integration Guide

> That sounds like you want to roll your own external solution instead of using 
> the backup provider API that is currently being developed.
We are happy to integrate with backup provider APIs if they are stable and 
ready for the integration. On this same thread, I had asked few questions about 
APIs timelines. Could you please help us to get that info?

> Backups in QEMU do not use explicit snapshots. A copy-before-write filter is 
> inserted on top of the source disk in QEMU's block graph.
What is the API to create copy-before-write snapshot of the disk image? And 
does it support all formats and storage devices?

Thanks
Prashant

-----Original Message-----
From: Fiona Ebner <f.eb...@proxmox.com>
Sent: 17 March 2025 04:23 PM
To: Prashant Patil <prashant.gamepa...@veritas.com>; Proxmox VE development 
discussion <pve-devel@lists.proxmox.com>; Thomas Lamprecht 
<t.lampre...@proxmox.com>
Cc: Anuradha Joshi <anuradha.jo...@veritas.com>; Sudhir Subbarao 
<sudhir.subba...@veritas.com>; Jason Voneberstein 
<jason.voneberst...@veritas.com>
Subject: Re: [pve-devel] About PVE Backup Integration Guide


CAUTION: This email originated from outside the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe. If you believe this is a phishing email, use the Report to 
Cybersecurity icon in Outlook.



Am 17.03.25 um 08:02 schrieb Prashant Patil:
>> The block tracking is ideally done via QEMU, then you don't require any 
>> special features for the underlying storages.
>
> Yes, we were able to get sector map of disks present on 'Directory' storage 
> type. However, for other storage types such as lvm, lvm-thin, zfs which 
> supports raw disk format, here we could get entire disk as allocated which is 
> not the case in real. I could not find much information on this, hence wanted 
> to know whether this by-design behaviour or we are missing something? Pasting 
> output of qemu-img map below for the 2 GB disk on zfs. Have also tried 
> getting map over ndb but got the same result. Is there anything that we are 
> missing here?
>
> root@be-proxmox1:/dev/pve# qemu-img map -f raw --output=json
> /dev/zvol/zfs1/vm-105-disk-2 [{ "start": 0, "length": 2147483648,
> "depth": 0, "present": true, "zero": false, "data": true,
> "compressed": false, "offset": 0}]

That sounds like you want to roll your own external solution instead of using 
the backup provider API that is currently being developed. With that API, you 
get the images to be backed-up as as NBD exports. For incremental backup, you 
can read the dirty bitmap. This can also be done via NBD. Again, then you don't 
need to worry about the underlying storage layer at all to support certain 
features.

>> certain storage types do not support snapshots. In such cases, what is the 
>> recommended way to take backup of the running VM?
>
> As mentioned earlier, we have found few storage devices which does not 
> support snapshot, but have found that we can take individual disk snapshot 
> through 'blockdev-snapshot-sync'. If we have to take backup of the VM, then 
> are we supposed to use this command to snapshot all VM disks?

Backups in QEMU do not use explicit snapshots. A copy-before-write filter is 
inserted on top of the source disk in QEMU's block graph. When new guest writes 
happen during backup, old data is first copied away to a fleecing image (or for 
regular backup directly to the backup target).
The backup provider API then also inserts a snapshot-access node that is 
exported via NBD and allows reading the data from the time of the backup in a 
consistent fashion (hence "snapshot-access", it's a virtual/implicit snapshot).

See also this diagram [0].

> [guest]                   [NBD export]
>    |                            |
>    | root                       | root
>    v                 file       v
> [copy-before-write]<------[snapshot-access]
>    |           |
>    | file      | target
>    v           v
> [active-disk] [temp.qcow2]

Best Regards,
Fiona

[0]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg876056.html


This message was sent by an employee of Arctera.


--- End Message ---
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to