[pve-devel] [PATCH storage 1/2] lvm: ignore "activation skip" LV flag during LV activation

Fiona Ebner f.ebner at proxmox.com
Fri Jan 26 12:14:59 CET 2024


Am 11.01.24 um 16:03 schrieb Friedrich Weber:
> LVs with the "activation skip" flag (can be set via `lvchange -ky`)
> are only activated if `-K` is passed to the activation command. In the
> next major release, we intend to set the "activation skip" flag for
> newly created LVs. The goal is to prevent LVs from being
> auto-activated after boot, and thus fix bug #4997.
> 
> In preparation for this future change, adjust activation commands
> issued by the LVM plugin to include the `-K` flag. For LVs without the
> "activation skip" flag, passing the `-K` flag during activation has no
> effect, so it should be harmless to always provide it.
> 
> [1] https://bugzilla.proxmox.com/show_bug.cgi?id=4997
> 
> Suggested-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> Signed-off-by: Friedrich Weber <f.weber at proxmox.com>

Reviewed-by: Fiona Ebner <f.ebner at proxmox.com>

> ---
>  src/PVE/Storage/LVMPlugin.pm | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
> index 4b951e7..66b42de 100644
> --- a/src/PVE/Storage/LVMPlugin.pm
> +++ b/src/PVE/Storage/LVMPlugin.pm
> @@ -342,7 +342,7 @@ sub lvcreate {
>  	$size .= "k"; # default to kilobytes
>      }
>  
> -    my $cmd = ['/sbin/lvcreate', '-aly', '-Wy', '--yes', '--size', $size, '--name', $name];
> +    my $cmd = ['/sbin/lvcreate', '-aly', '-K', '-Wy', '--yes', '--size', $size, '--name', $name];

Style nit: line too long

>      for my $tag (@$tags) {
>  	push @$cmd, '--addtag', $tag;
>      }




More information about the pve-devel mailing list