From c59a0f245247137140d273a4797fde5a4cc397db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Tue, 21 Mar 2017 10:11:42 +0100 Subject: [PATCH] rbd: fix rados df parser for luminous --- PVE/Storage/RBDPlugin.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm index 3a7c201..0db9b95 100644 --- a/PVE/Storage/RBDPlugin.pm +++ b/PVE/Storage/RBDPlugin.pm @@ -537,8 +537,12 @@ sub status { my $parser = sub { my $line = shift; - if ($line =~ m/^\s+total\s(\S+)\s+(\d+)/) { + if ($line =~ m/^\s*total(?:\s|_)(\S+)\s+(\d+)(k|M|G|T)?/) { $stats->{$1} = $2; + # luminous has units here.. + if ($3) { + $stats->{$1} *= $rbd_unittobytes->{$3}/1024; + } } };