]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/LVMPlugin.pm
pbs: backup-ns parameter was renamed to ns
[pve-storage.git] / PVE / Storage / LVMPlugin.pm
index 40c1613a03c2d4df660f9c38b69a5c741b9abdd0..a706e0cb4d32ceaf71bff7f397adb8fcc68b0bad 100644 (file)
@@ -97,6 +97,17 @@ sub lvm_create_volume_group {
     run_command($cmd, errmsg => "vgcreate $vgname $device error", errfunc => $ignore_no_medium_warnings, outfunc => $ignore_no_medium_warnings);
 }
 
+sub lvm_destroy_volume_group {
+    my ($vgname) = @_;
+
+    run_command(
+       ['vgremove', '-y', $vgname],
+       errmsg => "unable to remove volume group $vgname",
+       errfunc => $ignore_no_medium_warnings,
+       outfunc => $ignore_no_medium_warnings,
+    );
+}
+
 sub lvm_vgs {
     my ($includepvs) = @_;
 
@@ -173,6 +184,7 @@ sub lvm_list_volumes {
 
        my $d = {
            lv_size => int($lv_size),
+           lv_state => substr($lv_attr, 4, 1),
            lv_type => $lv_type,
        };
        $d->{pool_lv} = $pool_lv if $pool_lv;