New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mon: show the pg count in df output #7050
Conversation
3b144b0
to
daf786d
Compare
Hi, is there any body can help me?I can not understand this test error. |
792795a
to
9b9771d
Compare
73c3862
to
7e653bc
Compare
This output is already part of 'ceph osd df', btw. |
@liewegas Oh, thans very much to you Sage Weil. Show the total pg on each osd may be more related with the ceph pg dump osds command.Just personal idea. |
@@ -370,6 +373,7 @@ void osd_stat_t::generate_test_instances(std::list<osd_stat_t*>& o) | |||
o.back()->kb = 1; | |||
o.back()->kb_used = 2; | |||
o.back()->kb_avail = 3; | |||
o.back()->pg_sum = 100; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't add this to the osd_stat_t. It breaks compatibiltiy (at least the way it was added does) but more importantly it's not needed--the monitor already has a per-osd pg sum in the PGMap (see mon/PGMap.h). Use that instead!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liewegas Ok,clear it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@songbaisen i guess what @liewegas means is the PGMap::get_num_pg_by_osd(osd)
?
so you don't need to add pg_sum
to osd_stat_t
, by the way, the new pg_sum
field in osd_stat_t
breaks the compatibility. see ENCODE_START(4, 2, bl);
in the osd_stat_t::encode()
.
40b0eed
to
56de90a
Compare
could you add a prefix for the title of your commit message? and the last two lines of your commit do not look quite right, should be
|
@tchaikov Thanks for your warm education! That reminds me of my mentor.Now I can use github more skilled than before 。 |
ceph pg dump osds dumped osds in format plain osdstat kbused kbavail kb hb in hb out pg sum 0 143304204 79623420 234882056 [1,2] [] 330 1 143304204 79623420 234882056 [0,2] [] 295 2 143304148 79623476 234882056 [0,1] [] 303 sum 429912556 238870316 704646168 Fixes:ceph#14183 Signed-off-by: songbaisen song.baisen@zte.com.cn
Mon: show the total pg on each osd
ceph pg dump osds
dumped osds in format plain
osdstat kbused kbavail kb hb in hb out pg sum
0 143304204 79623420 234882056 [1,2] [] 330
1 143304204 79623420 234882056 [0,2] [] 295
2 143304148 79623476 234882056 [0,1] [] 303
sum 429912556 238870316 704646168
Fixes: #14183
Signed-off-by: song baisen song.baisen@zte.com.cn