[PATCH pve-storage] lvmplugin: fix: activate|deactivate volume, add missing storeid param in path sub

Alexandre Derumier alexandre.derumier at groupe-cyllene.com
Wed Sep 25 11:00:45 CEST 2024


$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 at groupe-cyllene.com>
---
 src/PVE/Storage/LVMPlugin.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
index 4b951e7..88fd612 100644
--- a/src/PVE/Storage/LVMPlugin.pm
+++ b/src/PVE/Storage/LVMPlugin.pm
@@ -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];
-- 
2.39.2




More information about the pve-devel mailing list