public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] Proposal: support for atomic snapshot of all VM disks at once
@ 2024-10-04 13:54 Ivaylo Markov via pve-devel
  2024-10-04 15:13 ` Dietmar Maurer
  0 siblings, 1 reply; 10+ messages in thread
From: Ivaylo Markov via pve-devel @ 2024-10-04 13:54 UTC (permalink / raw)
  To: pve-devel; +Cc: Ivaylo Markov

[-- Attachment #1: Type: message/rfc822, Size: 6833 bytes --]

From: Ivaylo Markov <ivaylo.markov@storpool.com>
To: pve-devel@lists.proxmox.com
Subject: Proposal: support for atomic snapshot of all VM disks at once
Date: Fri, 4 Oct 2024 16:54:39 +0300
Message-ID: <b16012bc-d4a9-42ff-b9ba-523649c6cfa6@storpool.com>

Greetings,

I am the maintainer of StorPool’s external storage plugin for PVE[0] 
which integrates our storage solution as a backend for VM disks. Our 
software has the ability to create atomic (crash-consistent) snapshots 
of a group of storage volumes. I’d like to use this feature in our 
plugin so that customers can perform whole VM snapshots, but that does 
not seem possible currently - the snapshot creation method is called 
individually for every disk.

I was directed here to discuss this proposal and my implementation idea 
after an initial post in Bugzilla[1]. The goal is to give storage 
plugins the option to perform atomic crash-consistent snapshots of the 
virtual disks associated with a virtual machine where the backend 
supports it  (e.g. Ceph, StorPool, and ZFS) without affecting those 
without such a feature.

I would add a `can_snapshot_volume_group` method to the base 
`PVE::Storage::Plugin` class, which would accept an array of the VM’s 
disks, and return a binary result whether an atomic snapshot is 
possible. The default implementation would return 0, but plugins with 
support can override it based on backend capabilities. For example, ZFS 
supports atomic snapshot of volume groups, but requires all volumes to 
be in the same pool.
The actual snapshot can be performed by a `snapshot_volume_group 
method`, which is not expected to be called unless the driver supports 
this operation.

In `PVE::AbstractConfig::snapshot_create` these two methods can be used 
to check and perform the atomic snapshots where possible, otherwise it 
would keep the current behavior of creating a snapshot for each disk 
separately. If the VM has drives with completely different storage 
backends (e.g. ZFS and LVM for whatever reason), the driver check can be 
skipped, and the current behavior used again.


[0] https://github.com/storpool/pve-storpool
[1] https://bugzilla.proxmox.com/show_bug.cgi?id=5752

Best regards,

-- 
Ivaylo Markov
StorPool Storage
https://www.storpool.com



[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-11-21 14:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <b16012bc-d4a9-42ff-b9ba-523649c6cfa6@storpool.com>
2024-10-08 10:50 ` [pve-devel] Proposal: support for atomic snapshot of all VM disks at once Max Carrara
2024-10-08 12:49   ` Ivaylo Markov via pve-devel
2024-11-20 16:10   ` Ivaylo Markov via pve-devel
     [not found]   ` <de35bf0d-5637-40a5-8286-a391807ab1d9@storpool.com>
2024-11-21 14:49     ` Max Carrara
2024-10-04 13:54 Ivaylo Markov via pve-devel
2024-10-04 15:13 ` Dietmar Maurer
2024-10-07  6:12   ` Fabian Grünbichler
2024-10-07  7:27     ` Ivaylo Markov via pve-devel
2024-10-07 10:58       ` DERUMIER, Alexandre via pve-devel
2024-10-07  7:12   ` Daniel Berteaud via pve-devel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal