From: Fiona Ebner <f.ebner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Friedrich Weber <f.weber@proxmox.com>
Subject: Re: [pve-devel] [PATCH storage 2/2] fix #4997: lvm: set "activation skip" flag for newly created LVs
Date: Fri, 26 Jan 2024 12:15:03 +0100 [thread overview]
Message-ID: <200f1517-290f-4912-8345-de3f9bc9be9a@proxmox.com> (raw)
In-Reply-To: <20240111150332.733635-3-f.weber@proxmox.com>
Am 11.01.24 um 16:03 schrieb Friedrich Weber:
> Activating an LV creates a device-mapper device. In a cluster with a
> shared LVM VG (e.g. on top of iSCSI) where an LV is active on nodes 1
> and 2, deleting the LV on node 1 will not clean up the device-mapper
> device on node 2. If an LV with the same name is recreated later, the
> leftover device-mapper device will cause activation of that LV on node
> 2 to fail with:
>
>> device-mapper: create ioctl on [...] failed: Device or resource busy
>
> By default, LVM autoactivates all discovered LVs after boot, thus
> creating device-mapper device for all discovered LVs. As a result,
> certain combinations of guest removal (and thus LV removals) and node
> reboots can cause guest creation or VM live migration (which both
> entail LV activation) to fail with the above error message, see [1].
>
> To avoid this issue in the future, adjust the LVM plugin to create new
> LVs with the "activation skip" flag. LVs with that flag are not
> activated unless `-K` is passed to the activation command. Consequently,
> new LVs will not be autoactivated after boot anymore, and removing LVs
> will not leave behind device-mapper devices on other nodes anymore.
>
> The LVM plugin is still able to activate LVs, as it already passes
> `-K` to all activation commands.
>
> Note that the flag is only set for newly created LVs, so LVs created
> before this patch can still trigger #4997. To avoid this, users can
> manually set the "activation skip" flag on existing LVs.
>
> [1] https://bugzilla.proxmox.com/show_bug.cgi?id=4997
>
> Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
>
> Notes:
> Should only be applied close to the next major release, see cover
> letter.
>
> src/PVE/Storage/LVMPlugin.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
next prev parent reply other threads:[~2024-01-26 11:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 15:03 [pve-devel] [PATCH storage 0/2] fix #4997: lvm: avoid autoactivating (new) LVs after boot Friedrich Weber
2024-01-11 15:03 ` [pve-devel] [PATCH storage 1/2] lvm: ignore "activation skip" LV flag during LV activation Friedrich Weber
2024-01-26 11:14 ` Fiona Ebner
2024-01-11 15:03 ` [pve-devel] [PATCH storage 2/2] fix #4997: lvm: set "activation skip" flag for newly created LVs Friedrich Weber
2024-01-26 11:15 ` Fiona Ebner [this message]
2024-01-26 11:14 ` [pve-devel] [PATCH storage 0/2] fix #4997: lvm: avoid autoactivating (new) LVs after boot Fiona Ebner
2024-01-31 15:07 ` Friedrich Weber
2024-02-01 8:26 ` Fiona Ebner
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=200f1517-290f-4912-8345-de3f9bc9be9a@proxmox.com \
--to=f.ebner@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox