From 5a16629577bd0d873590f505f29c1739a08305d3 Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Tue, 6 Jul 2021 11:50:26 +0200 Subject: [PATCH] lvm: wipe signatures on lvcreate 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 --- 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; }