From e4671f734b55f999c92a3b8c251884fb640d9aa5 Mon Sep 17 00:00:00 2001 From: Aaron Lauterer Date: Wed, 18 May 2022 11:04:54 +0200 Subject: [PATCH] rbd: fix #4060 show data-pool usage when configured When a data-pool is configured, use it for status infos. The 'data-pool' config option is used to mark the erasure coded pool while the 'pool' will be the replicated pool holding meta data such as the omap. This means, the 'pool' will only use a small amount of space and people are interested how much they can store in the erasure coded pool anyway. Therefore this patch reorders the assignment of the used pool name by availability of the scfg parameters: data-pool -> pool -> fallback 'rbd' Signed-off-by: Aaron Lauterer --- PVE/Storage/RBDPlugin.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm index fb48c3f..3511914 100644 --- a/PVE/Storage/RBDPlugin.pm +++ b/PVE/Storage/RBDPlugin.pm @@ -630,7 +630,7 @@ sub status { my $rados = $librados_connect->($scfg, $storeid); my $df = $rados->mon_command({ prefix => 'df', format => 'json' }); - my $pool = $scfg->{pool} ? $scfg->{pool} : 'rbd'; + my $pool = $scfg->{'data-pool'} // $scfg->{pool} // 'rbd'; my ($d) = grep { $_->{name} eq $pool } @{$df->{pools}};