[pve-devel] [PATCH manager 2/2] d/postinst: lvm config: check that --clear-needs-check-flag is set if there is a thin_check_options override
Fiona Ebner
f.ebner at proxmox.com
Fri Aug 8 16:03:24 CEST 2025
Quoting the commit message from [0] verbatim:
thin_check v1.0.x reveals data block ref count issue that is not being
detected by previous versions, which blocks the pool from activation if
there are any leaked blocks. To reduce potential user complaints on
inactive pools after upgrading and also maintain backward compatibility
between LVM and older thin_check, we decided to adopt the 'auto-repair'
functionality in the --clear-needs-check-flag option, rather than
passing --auto-repair from lvm.conf.
[0]: https://github.com/device-mapper-utils/thin-provisioning-tools/commit/eb28ab94
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
debian/postinst | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/debian/postinst b/debian/postinst
index b1761c24..b6e07fd9 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -238,6 +238,14 @@ case "$1" in
/usr/libexec/proxmox/proxmox-rrd-migration-tool --migrate || \
echo "migration failed, see output above for errors and try to migrate existing data manually by running '/usr/libexec/proxmox/proxmox-rrd-migration-tool --migrate'"
fi
+
+ if test -n "$2" && dpkg --compare-versions "$2" 'lt' '9.0.4'; then
+ if test -e /etc/lvm/lvm.conf && grep "^\s*thin_check_options" /etc/lvm/lvm.conf | grep -qv -- "--clear-needs-check-flag"; then
+ printf '\nNOTE: Detected override for 'thin_check_options' without '--clear-needs-check-flag' option in /etc/lvm/lvm.conf\n'
+ printf 'Add the option to the override or thin pools with minor issues might not automatically activate anymore!\n\n'
+ fi
+ fi
+
;;
abort-upgrade|abort-remove|abort-deconfigure)
--
2.47.2
More information about the pve-devel
mailing list