public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH storage] lvm: wipe signatures on lvcreate
@ 2021-07-06  9:50 Stoiko Ivanov
  2021-07-06 10:39 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Stoiko Ivanov @ 2021-07-06  9:50 UTC (permalink / raw)
  To: pve-devel

With PVE 7.0 we use upstream's lvm2 packages, which seem to detect
'more' signatures (and refuse creating lvs when they are present)

This prevents creating new disks on LVM (thick) storages as reported
on pve-user [0].

Adding -Wy to wipe signatures, and --yes (to actually wipe them
instead of prompting) fixes the aborted lvcreate.

Adding only to LVMPlugin and not to the lvcreate calls in
LvmThinPlugin, since I assume (and my quick tests confirm) that thin
pools are not affected by this issue..

Tested on a virtual test-setup with a LVM storage on a (virtual) iscsi
target and a local lvmthin storage.

[0] https://lists.proxmox.com/pipermail/pve-user/2021-July/172660.html

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 PVE/Storage/LVMPlugin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Storage/LVMPlugin.pm b/PVE/Storage/LVMPlugin.pm
index 039bfc1..139d391 100644
--- a/PVE/Storage/LVMPlugin.pm
+++ b/PVE/Storage/LVMPlugin.pm
@@ -330,7 +330,7 @@ sub lvcreate {
 	$size .= "k"; # default to kilobytes
     }
 
-    my $cmd = ['/sbin/lvcreate', '-aly', '--size', $size, '--name', $name];
+    my $cmd = ['/sbin/lvcreate', '-aly', '-Wy', '--yes', '--size', $size, '--name', $name];
     for my $tag (@$tags) {
 	push @$cmd, '--addtag', $tag;
     }
-- 
2.30.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH storage] lvm: wipe signatures on lvcreate
  2021-07-06  9:50 [pve-devel] [PATCH storage] lvm: wipe signatures on lvcreate Stoiko Ivanov
@ 2021-07-06 10:39 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-07-06 10:39 UTC (permalink / raw)
  To: Proxmox VE development discussion, Stoiko Ivanov

On 06.07.21 11:50, Stoiko Ivanov wrote:
> With PVE 7.0 we use upstream's lvm2 packages, which seem to detect
> 'more' signatures (and refuse creating lvs when they are present)
> 
> This prevents creating new disks on LVM (thick) storages as reported
> on pve-user [0].
> 
> Adding -Wy to wipe signatures, and --yes (to actually wipe them
> instead of prompting) fixes the aborted lvcreate.
> 
> Adding only to LVMPlugin and not to the lvcreate calls in
> LvmThinPlugin, since I assume (and my quick tests confirm) that thin
> pools are not affected by this issue..
> 
> Tested on a virtual test-setup with a LVM storage on a (virtual) iscsi
> target and a local lvmthin storage.
> 
> [0] https://lists.proxmox.com/pipermail/pve-user/2021-July/172660.html
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
>  PVE/Storage/LVMPlugin.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-06 10:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06  9:50 [pve-devel] [PATCH storage] lvm: wipe signatures on lvcreate Stoiko Ivanov
2021-07-06 10:39 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal