From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id DE49B94D72 for ; Mon, 16 Jan 2023 13:21:56 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C1FC8262DE for ; Mon, 16 Jan 2023 13:21:26 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Mon, 16 Jan 2023 13:21:25 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id C797044977 for ; Mon, 16 Jan 2023 13:21:24 +0100 (CET) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pve-devel@lists.proxmox.com Date: Mon, 16 Jan 2023 13:21:20 +0100 Message-Id: <20230116122120.4063364-1-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.135 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% 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] [RFC manager] vzdump: exclude zfs control dirs by default 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: , X-List-Received-Date: Mon, 16 Jan 2023 12:21:56 -0000 else in the face of snapdir=visible on a ZFS-backed mountpoint/rootfs, creating stop mode backups will fail (because automounting on access of .zfs/snapshot/XXX fails), and restoring a suspend mode backup onto a ZFS storage will fail (because an attempt to `mkdir /path/to/target/.zfs/snapshot/XXX` fails - or worse, if the "zfs_admin_snapshot" module parameter is enabled, will create an XXX snapshot for the newly-restored dataset). the two sub directories of .zfs were chosen to decrease the chance of false positives, since backing up or restoring the .zfs dir itself is unproblematic. Signed-off-by: Fabian Grünbichler --- Notes: see https://forum.proxmox.com/threads/restore-cannot-mkdir-permission-denied.121096 alternatively, this could also be handled in pve-container by checking for each mountpoint and explicitly skipping .zfs only if that mountpoint is actually backed by a ZFS storage.. if this patch is ACKed, the description of 'stdexcludes' in pve-guest-common should probably also be updated.. PVE/VZDump.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index a04837e7..9b9d37a8 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -542,6 +542,8 @@ sub new { '/tmp/?*', '/var/tmp/?*', '/var/run/?*.pid', + '.zfs/snapshot', + '.zfs/shares', ; } -- 2.30.2