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

rbd-mirror: Set the data pool correctly when creating images #17023

Merged
merged 2 commits into from Aug 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/rbd/rbd-mirroring.rst
Expand Up @@ -36,6 +36,13 @@ Ceph clusters.
configuration file of the same name (e.g. /etc/ceph/remote.conf). See the
`ceph-conf`_ documentation for how to configure multiple clusters.

.. note:: Images in a given pool will be mirrored to a pool with the same name
on the remote cluster. Images using a separate data-pool will use a data-pool
with the same name on the remote cluster. E.g., if an image being mirrored is
in the ``rbd`` pool on the local cluster and using a data-pool called
``rbd-ec``, pools called ``rbd`` and ``rbd-ec`` must exist on the remote
cluster and will be used for mirroring the image.

Enable Mirroring
----------------

Expand Down
2 changes: 2 additions & 0 deletions src/tools/rbd_mirror/image_replayer/CreateImageRequest.cc
Expand Up @@ -74,6 +74,8 @@ void CreateImageRequest<I>::create_image() {
m_remote_image_ctx->stripe_unit);
image_options.set(RBD_IMAGE_OPTION_STRIPE_COUNT,
m_remote_image_ctx->stripe_count);
image_options.set(RBD_IMAGE_OPTION_DATA_POOL,
m_remote_image_ctx->data_ctx.get_pool_name());

librbd::image::CreateRequest<I> *req = librbd::image::CreateRequest<I>::create(
m_local_io_ctx, m_local_image_name, m_local_image_id,
Expand Down