]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/LVMPlugin.pm
extend functionality to (de)activate_volumes with snapshots
[pve-storage.git] / PVE / Storage / LVMPlugin.pm
index e59c4a9033e62e34fa38d556da0dec4227e9d963..5dc732e29bd3e9bb713c6f7d8d5ebd7d78fe64cf 100644 (file)
@@ -421,9 +421,9 @@ sub deactivate_storage {
 }
 
 sub activate_volume {
-    my ($class, $storeid, $scfg, $volname, $cache) = @_;
+    my ($class, $storeid, $scfg, $volname, $snapname, $cache) = @_;
     #fix me lvmchange is not provided on
-    my $path = $class->path($scfg, $volname);
+    my $path = $class->path($scfg, $volname, $snapname);
 
     my $lvm_activate_mode = 'ey';
 
@@ -432,9 +432,9 @@ sub activate_volume {
 }
 
 sub deactivate_volume {
-    my ($class, $storeid, $scfg, $volname, $cache) = @_;
+    my ($class, $storeid, $scfg, $volname, $snapname, $cache) = @_;
 
-    my $path = $class->path($scfg, $volname);
+    my $path = $class->path($scfg, $volname, $snapname);
     return if ! -b $path;
 
     my $cmd = ['/sbin/lvchange', '-aln', $path];