From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 7C0C51FF165 for ; Thu, 31 Jul 2025 10:24:52 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4ED9D35B95; Thu, 31 Jul 2025 10:26:17 +0200 (CEST) From: Friedrich Weber To: pve-devel@lists.proxmox.com Date: Thu, 31 Jul 2025 10:24:52 +0200 Message-ID: <20250731082538.31891-1-f.weber@proxmox.com> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1753950331424 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.011 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH storage] plugin: nfs, cifs: use volume qemu snapshot methods from dir plugin X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "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 --- 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