]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/rbd : add namespace mirroring updates 60420/head
authorN Balachandran <nibalach@redhat.com>
Tue, 22 Oct 2024 04:47:00 +0000 (10:17 +0530)
committerN Balachandran <nibalach@redhat.com>
Thu, 24 Oct 2024 04:18:29 +0000 (09:48 +0530)
Updates the rbd docs with the new remote-namespace
mirroring configuration option.

Signed-off-by: N Balachandran <nibalach@redhat.com>
doc/man/8/rbd.rst
doc/rbd/rbd-mirroring.rst

index 4039e78fad3ad230f40788152fae30c1aaf09da0..492dad652d211083220a77cc30452047273f36fa 100644 (file)
@@ -532,7 +532,7 @@ Commands
   disabled on all images (within the pool or namespace) for which mirroring
   was enabled, whether by default or explicitly.
 
-:command:`mirror pool enable` [*pool-name*] *mode*
+:command:`mirror pool enable` *pool-name* *mode* [--remote-namespace *remote-namespace-name*]
   Enable RBD mirroring within a pool or namespace.
   The mirroring mode can either be ``pool`` or ``image``.
   If configured in ``pool`` mode, all images in the pool or namespace
@@ -540,6 +540,8 @@ Commands
   If configured in ``image`` mode, mirroring needs to be
   explicitly enabled (by ``mirror image enable`` command)
   on each image.
+  A namespace can be mirrored to a different namespace on the remote
+  pool using the ``--remote-namespace`` option.
 
 :command:`mirror pool info` [*pool-name*]
   Show information about the pool or namespace mirroring configuration.
index 2c9cc1b66bf82db454d59958bb00d3d2e9dbdb34..add0e9503b0ab97e6d56064ed8150ced68cc6512 100644 (file)
@@ -23,18 +23,21 @@ capability is available in two modes:
   blocks can be quickly determined without the need to scan the full RBD image.
   Since this mode is not as fine-grained as journaling, the complete delta 
   between two snapshots will need to be synced prior to use during a failover
-  scenario. Any partially applied set of deltas will be rolled back at moment
-  of failover.
+  scenario. Any partially applied set of deltas will be rolled back at the 
+  moment of failover.
 
 .. note:: journal-based mirroring requires the Ceph Jewel release or later;
    snapshot-based mirroring requires the Ceph Octopus release or later.
 
+.. note:: All instances of the term "namespace" in this document refer to RBD
+   namespaces.
+
 Mirroring is configured on a per-pool basis within peer clusters and can be
-configured on a specific subset of images within the pool.  You can also mirror
-all images within a given pool when using journal-based
-mirroring. Mirroring is configured using the ``rbd`` command. The
-``rbd-mirror`` daemon is responsible for pulling image updates from the remote
-peer cluster and applying them to the image within the local cluster.
+configured on a namespace or specific subset of images within the pool or
+namespace. You can also mirror all images within a given pool or namespace when
+using journal-based mirroring. Mirroring is configured using the ``rbd``
+command. The ``rbd-mirror`` daemon is responsible for pulling image updates from
+the remote peer cluster and applying them to the image within the local cluster.
 
 Depending on the desired needs for replication, RBD mirroring can be configured
 for either one- or two-way replication:
@@ -231,6 +234,57 @@ pool as follows:
    same name exists on the destination cluster, that pool will be used.
 #. If neither of the above is true, no data pool will be set.
 
+Namespace Configuration
+=======================
+
+Mirroring can be configured on a namespace in a pool. The pool must already
+have been configured for mirroring. The namespace can be mirrored to a namespace
+with the same or a different name in the remote pool.
+
+Enable Mirroring
+----------------
+
+To enable mirroring on a namespace with ``rbd``, issue the ``mirror pool enable``
+subcommand with the namespace spec and the mirroring mode, and an optional
+remote namespace name::
+
+        rbd mirror pool enable {pool-name}/{local-namespace-name} {mode} [--remote-namespace {remote-namespace-name}]
+
+The mirroring mode can either be ``image`` or ``pool``:
+
+* **image**: When configured in ``image`` mode, mirroring must
+  `explicitly enabled`_ on each image.
+* **pool** (default):  When configured in ``pool`` mode, all images in the namespace
+  with the journaling feature enabled are mirrored.
+
+For example::
+
+        $ rbd --cluster site-a mirror pool enable image-pool/namespace-a image --remote-namespace namespace-b
+        $ rbd --cluster site-b mirror pool enable image-pool/namespace-b image --remote-namespace namespace-a
+
+This will set up image mode mirroring between image-pool/namespace-a on cluster
+site-a and image-pool/namespace-b on cluster site-b.
+The namespace and remote-namespace pair configured on a cluster must
+match the remote-namespace and namespace respectively on the remote cluster.
+If the ``--remote-namespace`` option is not provided, the namespace will be
+mirrored to a namespace with the same name in the remote pool.
+
+Disable Mirroring
+-----------------
+
+To disable mirroring on a namespace with ``rbd``, specify the ``mirror pool disable``
+command and the namespace spec::
+
+        rbd mirror pool disable {pool-name}/{namespace-name}
+
+When configured in ``image`` mode, any mirror enabled images in the namespace
+must be explicitly disabled before disabling mirroring on the namespace.
+
+For example::
+
+        $ rbd --cluster site-a mirror pool disable image-pool/namespace-a
+        $ rbd --cluster site-b mirror pool disable image-pool/namespace-b
+
 Image Configuration
 ===================