From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com, Friedrich Weber <f.weber@proxmox.com>
Subject: [pve-devel] applied: [PATCH pve-manager v5 1/1] pve8to9: check for LVM autoactivation and provide migration script
Date: Wed, 9 Jul 2025 17:57:08 +0200 [thread overview]
Message-ID: <175207662533.1192376.2282676943004708424.b4-ty@proxmox.com> (raw)
In-Reply-To: <20250709141034.169726-4-f.weber@proxmox.com>
On Wed, 09 Jul 2025 16:10:00 +0200, Friedrich Weber wrote:
> Starting with PVE 9, the LVM and LVM-thin plugins create new LVs with
> the `--setautoactivation n` flag to fix #4997 [1]. However, this does
> not affect already existing LVs of setups upgrading from PVE 8.
>
> Hence, add a new script under /usr/share/pve-manager/migrations that
> finds guest volume LVs with autoactivation enabled on enabled and
> active LVM and LVM-thin storages, and disables autoactivation for each
> of them. Before doing so, ask the user for confirmation for each
> storage. For non-interactive usecases, the user can pass an flag to
> assume confirmation. Disabling autoactivation via lvchange updates the
> LVM metadata, hence, the storage lock is acquired before proceeding.
> To avoid holding the lock for too long and blocking other consumers,
> the lvchange calls are batched and the lock is released between two
> batches. Afterwards, check for remaining guest volume LVs with
> autoactivation enabled (these may have been created while the lock was
> not held). If there are still such LVs left, or if other errors
> occurred, suggest the user to run the command again.
>
> [...]
Applied, thanks! As quickly talked off-list: I pushed a follow-up commit to
change the warning to a notice for the case where only local LVM storages are
affected, as in that case a warning is IMO not justified, as keeping the status
quo then has no known problems, and while it might be a bit cleaner and save a
little bit of resources to not activate all local volumes on boot, it's not
worth the relatively scary warning level.
[1/1] pve8to9: check for LVM autoactivation and provide migration script
commit: ebed71c822e25c03211cbf0f97a3ef0c25a3f86e
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2025-07-09 15:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-09 14:09 [pve-devel] [PATCH manager/storage v5 0/3] fix #4997: lvm, lvm-thin: avoid autoactivating LVs Friedrich Weber
2025-07-09 14:09 ` [pve-devel] [PATCH pve-storage v5 1/2] fix #4997: lvm: create: disable autoactivation for new logical volumes Friedrich Weber
2025-07-09 15:39 ` [pve-devel] applied: " Thomas Lamprecht
2025-07-09 14:09 ` [pve-devel] [PATCH pve-storage v5 2/2] lvmthin: " Friedrich Weber
2025-07-09 15:39 ` [pve-devel] applied: " Thomas Lamprecht
2025-07-09 14:10 ` [pve-devel] [PATCH pve-manager v5 1/1] pve8to9: check for LVM autoactivation and provide migration script Friedrich Weber
2025-07-09 15:57 ` Thomas Lamprecht [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=175207662533.1192376.2282676943004708424.b4-ty@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=f.weber@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.