5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2025-02-04 17:47:17 +03:00

drbd: return correct used/avail/total sizes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2015-09-25 10:59:27 +02:00 committed by Dietmar Maurer
parent 7bdfa659f0
commit 2e346fd478

View File

@ -265,12 +265,12 @@ sub status {
eval {
my $hdl = connect_drbdmanage_service();
my $redundancy = get_redundancy($scfg);;
my ($rc, $res) = $hdl->cluster_free_query($redundancy);
my ($rc, $free_space, $total_space) = $hdl->cluster_free_query($redundancy);
check_drbd_res($rc);
$avail = $res;
$used = 0; # fixme
$total = $used + $avail;
$avail = $free_space;
$total = $total_space;
$used = $total_space - $free_space;
};
if (my $err = $@) {