extend list_thinpools for multiple vgs and more information
if no vg is given, give back all thinpools from all vgs if verbose is 1, then give back the information about the thinpools (like size and free) Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
83bbd6f5a1
commit
49d149e638
@ -180,9 +180,13 @@ sub list_thinpools {
|
||||
my $lvs = PVE::Storage::LVMPlugin::lvm_list_volumes($vg);
|
||||
my $thinpools = [];
|
||||
|
||||
foreach my $lvname (keys %{$lvs->{$vg}}) {
|
||||
next if $lvs->{$vg}->{$lvname}->{lv_type} ne 't';
|
||||
push @$thinpools, { lv => $lvname };
|
||||
foreach my $vg (keys %$lvs) {
|
||||
foreach my $lvname (keys %{$lvs->{$vg}}) {
|
||||
next if $lvs->{$vg}->{$lvname}->{lv_type} ne 't';
|
||||
my $lv = $lvs->{$vg}->{$lvname};
|
||||
$lv->{lv} = $lvname;
|
||||
push @$thinpools, $lv;
|
||||
}
|
||||
}
|
||||
|
||||
return $thinpools;
|
||||
|
||||
Reference in New Issue
Block a user