[pve-devel] [PATCH storage 1/1] status: rrddata: use new pve9 rrd location if file is present

Aaron Lauterer a.lauterer at proxmox.com
Fri May 23 18:37:44 CEST 2025


Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
 src/PVE/API2/Storage/Status.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/PVE/API2/Storage/Status.pm b/src/PVE/API2/Storage/Status.pm
index 14915ae..11074bc 100644
--- a/src/PVE/API2/Storage/Status.pm
+++ b/src/PVE/API2/Storage/Status.pm
@@ -376,9 +376,9 @@ __PACKAGE__->register_method ({
     code => sub {
 	my ($param) = @_;
 
-	return PVE::RRD::create_rrd_data(
-	    "pve2-storage/$param->{node}/$param->{storage}",
-	    $param->{timeframe}, $param->{cf});
+	my $path = "pve9-storage/$param->{node}/$param->{storage}";
+	$path = "pve2-storage/$param->{node}/$param->{storage}" if !-e "/var/lib/rrdcached/db/${path}";
+	return PVE::RRD::create_rrd_data($path, $param->{timeframe}, $param->{cf});
     }});
 
 # makes no sense for big images and backup files (because it
-- 
2.39.5





More information about the pve-devel mailing list