enh(emc/celerra): pools mode - potential disk space management (#3136)

This commit is contained in:
Le-Syl21 2021-09-23 16:21:22 +02:00 committed by GitHub
parent d6faacff27
commit eac16728cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 11 deletions

View File

@ -117,15 +117,17 @@ sub manage_selection {
next;
}
my $total_space = $fields->{total_mb} * 1024 * 1024;
my $used_space = $fields->{used_mb} * 1024 * 1024;
my $free_space = $fields->{avail_mb} * 1024 * 1024;
my $total_space = $fields->{total_mb} * 1024 * 1024;
my $potential_space = $fields->{potential_mb} * 1024 * 1024;
$self->{pools}->{ $fields->{name} } = {
name => $fields->{name},
total_space => $total_space,
used_space => $total_space - $free_space,
free_space => $free_space,
prct_used_space => ($total_space - $free_space) * 100 / $total_space,
prct_free_space => $free_space * 100 / $total_space
total_space => $total_space + $potential_space,
used_space => $used_space,
free_space => $free_space + $potential_space,
prct_used_space => $used_space * 100 / ($total_space + $potential_space),
prct_free_space => 100 - ($used_space * 100 / ($total_space + $potential_space))
};
}
}