[pve-devel] applied: [PATCH v2 manager] postinst: set custom LVM settings
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Jun 23 11:08:22 CEST 2021
On 23.06.21 11:00, Fabian Grünbichler wrote:
> now that we no longer ship our own LVM packages, set the relevant
> filtering options here if they are missing.
>
> for an upgrade from PVE 6.x, the following two scenarios are likely:
>
> 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 our
> 'don't scan zvols' entry, and set scan_lvs to false.
>
> 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.
>
> other combinations should be handled fine as well.
>
> for new installs (installer, install on top of Debian Bullseye) we are
> always in scenario B.
>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
>
> Notes:
> once other difference between our old config and the stock one is that we had
> 'issue_discards' enabled. we could either put this in the release notes, or
> also enable it here automatically - but it is less straight-forward since the
> default is not "almost certainly wrong" like for the filtering options..
>
> we could drop the "check for marker" and just do this once on initial 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 one from a
> guest on the host!) I'd rather play it safe..
>
> 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 that match")
>
> debian/postinst | 56 +++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 56 insertions(+)
>
>
applied, thanks!
More information about the pve-devel
mailing list