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 5616495137 for ; Tue, 17 Jan 2023 15:07:43 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3DB55C69D for ; Tue, 17 Jan 2023 15:07:43 +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 ; Tue, 17 Jan 2023 15:07:41 +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 3885742F80 for ; Tue, 17 Jan 2023 15:07:41 +0100 (CET) Date: Tue, 17 Jan 2023 15:07:39 +0100 From: Stoiko Ivanov To: Fabian =?UTF-8?B?R3LDvG5iaWNobGVy?= Cc: Proxmox VE development discussion Message-ID: <20230117150739.4718f90a@rosa.proxmox.com> In-Reply-To: <20230116122120.4063364-1-f.gruenbichler@proxmox.com> References: <20230116122120.4063364-1-f.gruenbichler@proxmox.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.24; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.157 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [vzdump.pm, proxmox.com] Subject: Re: [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: Tue, 17 Jan 2023 14:07:43 -0000 Thanks for tackling this and providing the patch LGTM code-wise and I think the potential for regression should be pretty small (plus users who want this can always adapt the vzdump invocation). small nit on the commit-message: On Mon, 16 Jan 2023 13:21:20 +0100 Fabian Gr=C3=BCnbichler wrote: > else in the face of snapdir=3Dvisible 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 While trying to reproduce this for a quick test I was confused - until I noticed - that the first backup in any mode (suspend/stop) always works, it's from the second backup where suspend and stop fail The reason is that the first backup automounts the/all snapshots in the PVE node, and the second backup again triggers a mount (probably due to the different mount namespace), which in turn fails (because the snapshot is already mounted. w/ w/o a potential adaptation of the commit message: Tested-by: Stoiko Ivanov Reviewed-by: Stoiko Ivanov > storage will fail (because an attempt to `mkdir /path/to/target/.zfs/snap= shot/XXX` > fails - or worse, if the "zfs_admin_snapshot" module parameter is enabled= , will > create an XXX snapshot for the newly-restored dataset). >=20 > the two sub directories of .zfs were chosen to decrease the chance of fal= se > positives, since backing up or restoring the .zfs dir itself is unproblem= atic. >=20 > Signed-off-by: Fabian Gr=C3=BCnbichler > --- >=20 > Notes: > see https://forum.proxmox.com/threads/restore-cannot-mkdir-permission= -denied.121096 > =20 > alternatively, this could also be handled in pve-container by checkin= g for each > mountpoint and explicitly skipping .zfs only if that mountpoint is ac= tually > backed by a ZFS storage.. > =20 > if this patch is ACKed, the description of 'stdexcludes' in pve-guest= -common should > probably also be updated.. >=20 > PVE/VZDump.pm | 2 ++ > 1 file changed, 2 insertions(+) >=20 > 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', > ; > } > =20