Project

General

Profile

Support #23677

rbd mirror: is there a method to calculate data size that have not been mirror to non-primary image?

Added by liuzhong chen almost 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Tags:
Reviewed:
Affected Versions:
Pull request ID:

Description

When I use rbd mirror between two cluster, is there a method to calculate data size that have not been mirror to non-primary image?
Now I have find the info below.But I don't know if I can calculate the data size with these info.

rbd mirror image status poolclz/rbdclz
rbdclz:
  global_id:   3bf9e3cf-353f-4afb-b54a-08b3734ec841
  state:       up+replaying
  description: replaying, master_position=[object_number=3, tag_tid=5, entry_tid=3467], mirror_position=[object_number=3, tag_tid=5, entry_tid=31], entries_behind_master=3436
  last_update: 2018-04-12 20:17:37

Thank you!
ceph version:12.2.4

History

#1 Updated by liuzhong chen almost 6 years ago

@Jason Dillaman,I have tried some method but can't.Do you have any advise.Thank you!

#2 Updated by Jason Dillaman almost 6 years ago

@liuzhong chen: There is no such support right now. The "entries_behind_master" is just a simple counter of the number of known journal entries that remain that is extracted from metadata. There is no associated entry size in that metadata so the only way to get a real number would be to read the entire journal (which is what occurs one record at a time during replay). The best you could attempt would be to gather some statistics about average entry size and the average number of entries committed per second to compute an estimate remaining size and backlog time.

We have a ticket in our backlog to cover this improvement [1] at some point in the future.

[1] https://trello.com/c/FhQ29aQ9

#3 Updated by liuzhong chen almost 6 years ago

@Jason Dillaman, OK,understanded.Thank you very much.
Another quetion, this issue [[http://tracker.ceph.com/issues/23516]].I read the cord of Replayer.cc.if entries_behind_master is less 32
IO,it would not be flushed.It also means that these entry will be not replayed for non-primary image which lead the non-primary image is not exactly the same as primary image.Am I right?
Thank you!

#4 Updated by liuzhong chen almost 6 years ago

liuzhong chen wrote:

@Jason Dillaman, OK,understanded.Thank you very much.
Another quetion, this issue http://tracker.ceph.com/issues/23516.I read the code of Replayer.cc.if entries_behind_master is less 32
IO,it would not be flushed.It also means that these entry will be not replayed for non-primary image which lead the non-primary image is not exactly the same as primary image.Am I right?
Thank you!

#5 Updated by Jason Dillaman almost 6 years ago

liuzhong chen wrote:

IO,it would not be flushed.It also means that these entry will be not replayed for non-primary image which lead the non-primary image is not exactly the same as primary image.Am I right?

No, that's not correct. Since rbd-mirror doesn't use a cache, it is safely replayed and stored in the non-primary image. The issue is that the commit position isn't updated, which affects the status display.

#6 Updated by liuzhong chen almost 6 years ago

@Jason Dillaman, OK,got it.Thank you!

#7 Updated by liuzhong chen almost 6 years ago

this support can be close if needed.

#8 Updated by Jason Dillaman about 4 years ago

  • Status changed from New to Closed

Also available in: Atom PDF