Merge branch 'ektich-lvsselect'

master
neingeist 5 years ago
commit 13845d76af

@ -8,7 +8,7 @@ my $crit = 96.0;
sub get_thinpools { sub get_thinpools {
$ENV{'LC_ALL'} = 'C'; # Set locale for lvs call $ENV{'LC_ALL'} = 'C'; # Set locale for lvs call
my @lvsoutput = `lvs --noheadings --separator : -o lv_attr,lv_name,data_percent,metadata_percent`; my @lvsoutput = `lvs --noheadings --separator : --select 'lv_attr =~ ^t' -o lv_attr,lv_name,data_percent,metadata_percent`;
my @thinpools; my @thinpools;
for my $lvsline (@lvsoutput) { for my $lvsline (@lvsoutput) {
@ -20,11 +20,9 @@ sub get_thinpools {
'metadata_percent' => $4, 'metadata_percent' => $4,
}; };
if ($lv->{lv_attr} =~ m#^t#x) {
push @thinpools, $lv; push @thinpools, $lv;
} }
} }
}
return @thinpools; return @thinpools;
} }

Loading…
Cancel
Save