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)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 38E0A74F80 for ; Wed, 23 Jun 2021 11:08:34 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2D8A98601 for ; Wed, 23 Jun 2021 11:08:34 +0200 (CEST) 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)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id F39138662 for ; Wed, 23 Jun 2021 11:08:32 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id C51374389E for ; Wed, 23 Jun 2021 11:08:32 +0200 (CEST) Message-ID: <9fd369e4-7b22-6003-0918-0e214ef7b11b@proxmox.com> Date: Wed, 23 Jun 2021 11:08:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:90.0) Gecko/20100101 Thunderbird/90.0 Content-Language: en-US To: Proxmox VE development discussion , =?UTF-8?Q?Fabian_Gr=c3=bcnbichler?= References: <20210623090025.2994983-1-f.gruenbichler@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20210623090025.2994983-1-f.gruenbichler@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.674 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] applied: [PATCH v2 manager] postinst: set custom LVM settings 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: Wed, 23 Jun 2021 09:08:34 -0000 On 23.06.21 11:00, Fabian Gr=C3=BCnbichler wrote: > now that we no longer ship our own LVM packages, set the relevant > filtering options here if they are missing. >=20 > for an upgrade from PVE 6.x, the following two scenarios are likely: >=20 > A: user edited config provided by our old lvm2 package. it likely > contains our (or a modified) global_filter, but the old scan_lvs > default. in this case we ignore global_filter as long as it contains ou= r > 'don't scan zvols' entry, and set scan_lvs to false. >=20 > B: config provided by our old lvm2 package was taken over by default > config from stock lvm2 package. scan_lvs defaults to false already, but= > global_filter is unset (scan everything), so we need to set our own > global_filter excluding zvols. >=20 > other combinations should be handled fine as well. >=20 > for new installs (installer, install on top of Debian Bullseye) we are > always in scenario B. >=20 > Signed-off-by: Fabian Gr=C3=BCnbichler > --- >=20 > Notes: > once other difference between our old config and the stock one is t= hat we had > 'issue_discards' enabled. we could either put this in the release n= otes, or > also enable it here automatically - but it is less straight-forward= since the > default is not "almost certainly wrong" like for the filtering opti= ons.. > =20 > we could drop the "check for marker" and just do this once on initi= al install > and upgrades from 6.x, but since the fallout from not having these = in place can > be data corruption (activating multiple VGs with same name, using o= ne from a > guest on the host!) I'd rather play it safe.. > =20 > v2: > - move more variables into if branch > - export env variable to suppress LVM warnings (thanks Thomas) > - fix grep for marker ("any lines that don't match" vs "no lines th= at match") >=20 > debian/postinst | 56 +++++++++++++++++++++++++++++++++++++++++++++++++= > 1 file changed, 56 insertions(+) >=20 > applied, thanks!