5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2025-02-25 17:57:31 +03:00

lvmplugin: fix: activate|deactivate volume, add missing storeid param in path sub

$storeid param is missing and $snapname is used as third param.

This seem to works actually because $snapname is always empty in lvm

Signed-off-by: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
This commit is contained in:
Alexandre Derumier 2024-09-25 11:00:45 +02:00 committed by Fiona Ebner
parent e16c816f97
commit 5808b0bf3b

View File

@ -532,7 +532,7 @@ sub deactivate_storage {
sub activate_volume {
my ($class, $storeid, $scfg, $volname, $snapname, $cache) = @_;
#fix me lvmchange is not provided on
my $path = $class->path($scfg, $volname, $snapname);
my $path = $class->path($scfg, $volname, $storeid, $snapname);
my $lvm_activate_mode = 'ey';
@ -545,7 +545,7 @@ sub activate_volume {
sub deactivate_volume {
my ($class, $storeid, $scfg, $volname, $snapname, $cache) = @_;
my $path = $class->path($scfg, $volname, $snapname);
my $path = $class->path($scfg, $volname, $storeid, $snapname);
return if ! -b $path;
my $cmd = ['/sbin/lvchange', '-aln', $path];