]> git.proxmox.com Git - pve-manager.git/blobdiff - PVE/API2/Ceph/OSD.pm
ceph osd: return PGs per OSD and show in UI
[pve-manager.git] / PVE / API2 / Ceph / OSD.pm
index 18195743acdf96ca46efb389370988d44dc38463..09fb3bba83ead21ebe8fa3e08a4a7a27e94d7e1a 100644 (file)
@@ -105,7 +105,7 @@ __PACKAGE__->register_method ({
        PVE::Ceph::Tools::check_ceph_inited();
 
        my $rados = PVE::RADOS->new();
-       my $res = $rados->mon_command({ prefix => 'osd tree' });
+       my $res = $rados->mon_command({ prefix => 'osd df', output_method => 'tree', });
 
         die "no tree nodes found\n" if !($res && $res->{nodes});
 
@@ -131,7 +131,7 @@ __PACKAGE__->register_method ({
                type => $e->{type}
            };
 
-           foreach my $opt (qw(status crush_weight reweight device_class)) {
+           foreach my $opt (qw(status crush_weight reweight device_class pgs)) {
                $new->{$opt} = $e->{$opt} if defined($e->{$opt});
            }