public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH storage] plugin: nfs, cifs: use volume qemu snapshot methods from dir plugin
@ 2025-07-31  8:24 Friedrich Weber
  2025-08-04  9:25 ` [pve-devel] applied: " Fiona Ebner
  0 siblings, 1 reply; 2+ messages in thread
From: Friedrich Weber @ 2025-07-31  8:24 UTC (permalink / raw)
  To: pve-devel

Taking an offline snapshot of a VM on an NFS/CIFS storage with
snapshot-as-volume-chain currently creates a volume-chain snapshot as
expected, but taking an online snapshot unexpectedly creates a qcow2
snapshot. This was also reported in the forum [1].

The reason is that the NFS/CIFS plugins inherit the method
volume_qemu_snapshot_method from the Plugin base class, whereas they
actually behave similarly to the Directory plugin. To fix this,
implement the method for the NFS/CIFS plugins and let it call the
Directory plugin's implementation.

[1] https://forum.proxmox.com/threads/168619/post-787374

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
---

Notes:
    I'm not 100% sure I've correctly grasped volume_qemu_snapshot_method,
    so please double-check my reasoning.

 src/PVE/Storage/CIFSPlugin.pm | 4 ++++
 src/PVE/Storage/NFSPlugin.pm  | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/src/PVE/Storage/CIFSPlugin.pm b/src/PVE/Storage/CIFSPlugin.pm
index 35a1a3b..5b35daf 100644
--- a/src/PVE/Storage/CIFSPlugin.pm
+++ b/src/PVE/Storage/CIFSPlugin.pm
@@ -331,4 +331,8 @@ sub get_import_metadata {
     return PVE::Storage::DirPlugin::get_import_metadata(@_);
 }
 
+sub volume_qemu_snapshot_method {
+    return PVE::Storage::DirPlugin::volume_qemu_snapshot_method(@_);
+}
+
 1;
diff --git a/src/PVE/Storage/NFSPlugin.pm b/src/PVE/Storage/NFSPlugin.pm
index b416703..4cc02c9 100644
--- a/src/PVE/Storage/NFSPlugin.pm
+++ b/src/PVE/Storage/NFSPlugin.pm
@@ -241,4 +241,8 @@ sub get_import_metadata {
     return PVE::Storage::DirPlugin::get_import_metadata(@_);
 }
 
+sub volume_qemu_snapshot_method {
+    return PVE::Storage::DirPlugin::volume_qemu_snapshot_method(@_);
+}
+
 1;
-- 
2.47.2



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


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

* [pve-devel] applied:  [PATCH storage] plugin: nfs, cifs: use volume qemu snapshot methods from dir plugin
  2025-07-31  8:24 [pve-devel] [PATCH storage] plugin: nfs, cifs: use volume qemu snapshot methods from dir plugin Friedrich Weber
@ 2025-08-04  9:25 ` Fiona Ebner
  0 siblings, 0 replies; 2+ messages in thread
From: Fiona Ebner @ 2025-08-04  9:25 UTC (permalink / raw)
  To: Proxmox VE development discussion, Friedrich Weber

Am 31.07.25 um 10:26 AM schrieb Friedrich Weber:
> Taking an offline snapshot of a VM on an NFS/CIFS storage with
> snapshot-as-volume-chain currently creates a volume-chain snapshot as
> expected, but taking an online snapshot unexpectedly creates a qcow2
> snapshot. This was also reported in the forum [1].
> 
> The reason is that the NFS/CIFS plugins inherit the method
> volume_qemu_snapshot_method from the Plugin base class, whereas they
> actually behave similarly to the Directory plugin. To fix this,
> implement the method for the NFS/CIFS plugins and let it call the
> Directory plugin's implementation.
> 
> [1] https://forum.proxmox.com/threads/168619/post-787374
> 
> Signed-off-by: Friedrich Weber <f.weber@proxmox.com>

For the record, this was already applied:
https://git.proxmox.com/?p=pve-storage.git;a=commit;h=3c209eaeb755bd702eb34cfd49589359a21858cf


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


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

end of thread, other threads:[~2025-08-04  9:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-31  8:24 [pve-devel] [PATCH storage] plugin: nfs, cifs: use volume qemu snapshot methods from dir plugin Friedrich Weber
2025-08-04  9:25 ` [pve-devel] applied: " Fiona Ebner

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