mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2025-01-11 05:18:01 +03:00
lvmthin: activate base volumes
create_base() uses '-ky' to prevent base images from being activated by default, similar to snapshots. This means we need to activate them like snapshots with the '-K' option.
This commit is contained in:
parent
a526d21a18
commit
f44e50fed1
@ -209,6 +209,9 @@ sub activate_volume {
|
||||
my $snapvol = "snap_${volname}_$snapname";
|
||||
my $cmd = ['/sbin/lvchange', '-ay', '-K', "$vg/$snapvol"];
|
||||
run_command($cmd, errmsg => "activate_volume '$vg/$snapvol' error");
|
||||
} elsif ($volname =~ /^base-/) {
|
||||
my $cmd = ['/sbin/lvchange', '-ay', '-K', "$vg/$volname"];
|
||||
run_command($cmd, errmsg => "activate_volume '$vg/$volname' error");
|
||||
} else {
|
||||
# other volumes are active by default
|
||||
}
|
||||
@ -224,6 +227,9 @@ sub deactivate_volume {
|
||||
my $snapvol = "snap_${volname}_$snapname";
|
||||
my $cmd = ['/sbin/lvchange', '-an', "$vg/$snapvol"];
|
||||
run_command($cmd, errmsg => "deactivate_volume '$vg/$snapvol' error");
|
||||
} elsif ($volname =~ /^base-/) {
|
||||
my $cmd = ['/sbin/lvchange', '-an', "$vg/$volname"];
|
||||
run_command($cmd, errmsg => "deactivate_volume '$vg/$volname' error");
|
||||
} else {
|
||||
# other volumes are kept active
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user