]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/RBDPlugin.pm
rbd: add fallback default poolname 'rbd' to status
[pve-storage.git] / PVE / Storage / RBDPlugin.pm
index 22cac222dbd0f5edfa369c3b30ae4392cee623b2..9ee6a3759357bf1eab43deb668a5c69b4f328b5b 100644 (file)
@@ -630,7 +630,9 @@ sub status {
     my $rados = $librados_connect->($scfg, $storeid);
     my $df = $rados->mon_command({ prefix => 'df', format => 'json' });
 
-    my ($d) = grep { $_->{name} eq $scfg->{pool} } @{$df->{pools}};
+    my $pool =  $scfg->{pool} ? $scfg->{pool} : 'rbd';
+
+    my ($d) = grep { $_->{name} eq $pool } @{$df->{pools}};
 
     # max_avail -> max available space for data w/o replication in the pool
     # bytes_used -> data w/o replication in the pool