Skip to content
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

tools/ceph_objectstore_tool: fix 'dup' unable to duplicate meta PG #17623

Merged
merged 1 commit into from Sep 15, 2017

Conversation

liewegas
Copy link
Member

@liewegas liewegas commented Sep 10, 2017

Recently we plan to bring a Jewel cluster into Luminous.
After that is done, which turns out to be a big success,
we then try to transform all FileStore osds into BlueStore ones
offline but with no luck. The ceph_objectstore_tool keeps complaining:


dup from filestore: /var/lib/ceph/osd/ceph-20.old
to bluestore: /var/lib/ceph/osd/ceph-20
fsid d444b25-337d-4d15-9d63-86ae134ec9ac
65 collections
1/65 meta
cannot get bit count for collection meta: (61) No data available


The root cause is that for FileStore Luminous will always try to rewrite
pg "bits" as a file attribute on "Load" if that is not available.
But since meta pg is never loaded (we skip it during OSD::load_pgs()),
we actually never get the chance to do so; hence making the
dup method from ceph_objectstore_tool very unhappy since it always
expects to see such a attribute from underlying store.

Fix the above problem by manually skipping loading the "bits" attribute
if underlying OS is FileStore for dup.

Signed-off-by: xie xingguo xie.xingguo@zte.com.cn

(cherry picked from commit af2c484)

Recently we plan to bring a Jewel cluster into Luminous.
After that is done, which turns out to be a big success,
we then try to transform all FileStore osds into BlueStore ones
offline but with no luck. The ceph_objectstore_tool keeps complaining:
--------------------------------------------------------------------
dup from filestore: /var/lib/ceph/osd/ceph-20.old
      to bluestore: /var/lib/ceph/osd/ceph-20
fsid d444b25-337d-4d15-9d63-86ae134ec9ac
65 collections
1/65 meta
cannot get bit count for collection meta: (61) No data available
--------------------------------------------------------------------

The root cause is that for FileStore Luminous will always try to rewrite
pg "bits" as a file attribute on "Load" if that is not available.
But since meta pg is never loaded (we skip it during OSD::load_pgs()),
we actually never get the chance to do so; hence making the
dup method from ceph_objectstore_tool very unhappy since it always
expects to see such a attribute from underlying store.

Fix the above problem by manually skipping loading the "bits" attribute
if underlying OS is FileStore for dup.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>

(cherry picked from commit af2c484)
@theanalyst
Copy link
Member

this was tested with rados run: http://tracker.ceph.com/issues/21296#note-16
@liewegas @jdurgin do you think this can be merged?

@theanalyst theanalyst merged commit f52c6dc into ceph:luminous Sep 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants