Skip to content

Commit 2a1558a

Browse files
committed
doc/cephfs: Cosmetic changes and small fixes in cephfs-mirroring.rst
Don't format an unordered list as preformatted block. Fix (not linked) reference to a section name that doesn't exist. Don't call systemd unit files "systemctl unit files", add an "and" between them. Clarify by means of inline formatting and whitespace that config value is "60" and the unit for that is seconds (as opposed to value being "60s"). Use double backticks consistently when listing commands, file names or paths, command parameters, syntaxes, etc. Use star for inline italic instead of single backtick (to differentiate from the previous). Don't use double backticks for "cephadm" when talking about the concept. Don't capitalize a few words that didn't need it. Capitalize table data for consistency. All caps for "MDS". Small updates to language in text. Call it "cephfs-mirror" everywhere and not "cephfs_mirror" at one place. Signed-off-by: Ville Ojamo <[email protected]>
1 parent 1dede9d commit 2a1558a

File tree

1 file changed

+48
-47
lines changed

1 file changed

+48
-47
lines changed

doc/cephfs/cephfs-mirroring.rst

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CephFS Snapshot Mirroring
55
=========================
66

77
CephFS supports asynchronous replication of snapshots to a remote CephFS file system via
8-
the `cephfs-mirror` tool. Snapshots are synchronized by mirroring snapshot data followed by
8+
the ``cephfs-mirror`` tool. Snapshots are synchronized by mirroring snapshot data followed by
99
creating a remote snapshot with the same name (for a given directory on the remote file system) as
1010
the source snapshot.
1111

@@ -19,7 +19,7 @@ The primary (local) and secondary (remote) Ceph clusters version should be Pacif
1919
Creating Users
2020
--------------
2121

22-
Start by creating a Ceph user (on the primary/local cluster) for the `cephfs-mirror` daemon. This user
22+
Start by creating a Ceph user (on the primary/local cluster) for the ``cephfs-mirror`` daemon. This user
2323
requires write capability on the metadata pool to create RADOS objects (index objects)
2424
for watch/notify operation and read capability on the data pool(s)::
2525

@@ -35,16 +35,17 @@ This user will be supplied as part of the peer specification when adding a peer.
3535
Starting Mirror Daemon
3636
----------------------
3737

38-
The mirror daemon should be spawned using `systemctl(1)` unit files::
38+
The mirror daemon is managed by ``systemd``, though in most cases it is best to use
39+
the ``cephadm`` interface::
3940

4041
$ systemctl enable cephfs-mirror@mirror
4142
$ systemctl start cephfs-mirror@mirror
4243

43-
`cephfs-mirror` daemon can be run in foreground using::
44+
``cephfs-mirror`` daemon can be run in foreground using::
4445

4546
$ cephfs-mirror --id mirror --cluster site-a -f
4647

47-
.. note:: The user specified here is `mirror`, the creation of which is
48+
.. note:: The user specified here is ``mirror``, the creation of which is
4849
described in the :ref:`Creating Users<cephfs_mirroring_creating_users>`
4950
section.
5051

@@ -53,7 +54,7 @@ synchronization and high availability. Mirror daemons share the synchronization
5354
load using a simple ``M/N`` policy, where ``M`` is the number of directories
5455
and ``N`` is the number of ``cephfs-mirror`` daemons.
5556

56-
When ``cephadm`` is used to manage a Ceph cluster, ``cephfs-mirror`` daemons can be
57+
When cephadm is used to manage a Ceph cluster, ``cephfs-mirror`` daemons can be
5758
deployed by running the following command:
5859

5960
.. prompt:: bash $
@@ -66,7 +67,7 @@ To deploy multiple mirror daemons, run a command of the following form:
6667

6768
ceph orch apply cephfs-mirror --placement=<placement-spec>
6869

69-
For example, to deploy 3 `cephfs-mirror` daemons on different hosts, run a command of the following form:
70+
For example, to deploy three ``cephfs-mirror`` daemons on different hosts, run a command of the following form:
7071

7172
.. prompt:: bash $
7273

@@ -75,7 +76,7 @@ For example, to deploy 3 `cephfs-mirror` daemons on different hosts, run a comma
7576
Interface
7677
---------
7778

78-
The `Mirroring` module (manager plugin) provides interfaces for managing
79+
The Manager ``mirroring`` module provides interfaces for managing
7980
directory snapshot mirroring. These are (mostly) wrappers around monitor
8081
commands for managing file system mirroring and is the recommended control
8182
interface.
@@ -145,17 +146,17 @@ To add a peer, run a command of the following form:
145146

146147
``<remote_cluster_spec>`` is of the format ``client.<id>@<cluster_name>``.
147148

148-
``<remote_fs_name>`` is optional, and defaults to `<fs_name>` (on the remote
149-
cluster).
149+
``<remote_fs_name>`` is optional, and defaults to the same value as ``<fs_name>``
150+
(on the remote cluster).
150151

151152
For this command to succeed, the remote cluster's Ceph configuration and user
152153
keyring must be available in the primary cluster. For example, if a user named
153154
``client_mirror`` is created on the remote cluster which has ``rwps``
154-
permissions for the remote file system named ``remote_fs`` (see `Creating
155-
Users`) and the remote cluster is named ``remote_ceph`` (that is, the remote
156-
cluster configuration file is named ``remote_ceph.conf`` on the primary
157-
cluster), run the following command to add the remote filesystem as a peer to
158-
the primary filesystem ``primary_fs``:
155+
permissions for the remote file system named ``remote_fs`` (see :ref:`Creating
156+
Users<cephfs_mirroring_creating_users>`) and the remote cluster is named
157+
``remote_ceph`` (that is, the remote cluster configuration file is named
158+
``remote_ceph.conf`` on the primary cluster), run the following command to add
159+
the remote filesystem as a peer to the primary filesystem ``primary_fs``:
159160

160161
.. prompt:: bash $
161162

@@ -234,10 +235,10 @@ daemons) and for checking the directory distribution.
234235
Bootstrap Peers
235236
---------------
236237

237-
Adding a peer (via `peer_add`) requires the peer cluster configuration and user keyring
238-
to be available in the primary cluster (manager host and hosts running the mirror daemon).
239-
This can be avoided by bootstrapping and importing a peer token. Peer bootstrap involves
240-
creating a bootstrap token on the peer cluster via::
238+
Adding a peer via the ``peer_add`` subcommand requires the peer cluster configuration and
239+
user keyring to be available in the primary cluster (manager host and hosts running the
240+
mirror daemon). This can be avoided by bootstrapping and importing a peer token. Peer
241+
bootstrap involves creating a bootstrap token on the peer cluster via::
241242

242243
$ ceph fs snapshot mirror peer_bootstrap create <fs_name> <client_entity> <site-name>
243244

@@ -246,8 +247,8 @@ e.g.::
246247
$ ceph fs snapshot mirror peer_bootstrap create backup_fs client.mirror_remote site-remote
247248
{"token": "eyJmc2lkIjogIjBkZjE3MjE3LWRmY2QtNDAzMC05MDc5LTM2Nzk4NTVkNDJlZiIsICJmaWxlc3lzdGVtIjogImJhY2t1cF9mcyIsICJ1c2VyIjogImNsaWVudC5taXJyb3JfcGVlcl9ib290c3RyYXAiLCAic2l0ZV9uYW1lIjogInNpdGUtcmVtb3RlIiwgImtleSI6ICJBUUFhcDBCZ0xtRmpOeEFBVnNyZXozai9YYUV0T2UrbUJEZlJDZz09IiwgIm1vbl9ob3N0IjogIlt2MjoxOTIuMTY4LjAuNTo0MDkxOCx2MToxOTIuMTY4LjAuNTo0MDkxOV0ifQ=="}
248249

249-
`site-name` refers to a user-defined string to identify the remote filesystem. In context
250-
of `peer_add` interface, `site-name` is the passed in `cluster` name from `remote_cluster_spec`.
250+
``site-name`` refers to a user-defined string to identify the remote filesystem. In context
251+
of the ``peer_add`` subcommand, ``site-name`` is that contained in the ``remote_cluster_spec``.
251252

252253
Import the bootstrap token in the primary cluster via::
253254

@@ -270,7 +271,7 @@ To initiate snapshot mirroring, create a snapshot of the configured directory in
270271
Mirroring Status
271272
----------------
272273

273-
CephFS mirroring module provides `mirror daemon status` interface to check mirror daemon status::
274+
CephFS mirroring module provides ``mirror daemon status`` interface to check mirror daemon status::
274275

275276
$ ceph fs snapshot mirror daemon status
276277
[
@@ -316,10 +317,10 @@ available commands for mirror status use::
316317
....
317318
}
318319

319-
Commands prefixed with`fs mirror status` provide mirror status for mirror enabled
320-
file systems. Note that `cephfs@360` is of format `filesystem-name@filesystem-id`.
320+
Commands beginning with ``fs mirror status`` provide mirror status for mirror enabled
321+
file systems. Note that ``cephfs@360`` is of format ``filesystem-name@filesystem-id``.
321322
This format is required since mirror daemons get asynchronously notified regarding
322-
file system mirror status (A file system can be deleted and recreated with the same
323+
file system mirror status (a file system can be deleted and recreated with the same
323324
name).
324325

325326
This command currently provides minimal information regarding mirror status::
@@ -341,12 +342,12 @@ This command currently provides minimal information regarding mirror status::
341342
}
342343
}
343344

344-
The `Peers` section in the command output above shows the peer information including the unique
345+
The ``peers`` section in the command output above shows the peer information including the unique
345346
peer-id (UUID) and specification. The peer-id is required when removing an existing peer
346-
as mentioned in the `Mirror Module and Interface` section.
347+
as mentioned in the *Mirroring Module* section.
347348

348-
Commands prefixed with `fs mirror peer status` provide peer synchronization status. This
349-
command is of format `filesystem-name@filesystem-id peer-uuid`::
349+
Commands beginning with ``fs mirror peer status`` provide peer synchronization status. The
350+
command parameter is of format ``filesystem-name@filesystem-id peer-uuid``::
350351

351352
$ ceph --admin-daemon /var/run/ceph/cephfs-mirror.asok fs mirror peer status cephfs@360 a2dc7784-e7a1-4723-b103-03ee8d8768f8
352353
{
@@ -365,18 +366,18 @@ command is of format `filesystem-name@filesystem-id peer-uuid`::
365366
}
366367
}
367368

368-
Synchronization stats including `snaps_synced`, `snaps_deleted` and `snaps_renamed` are reset
369+
Synchronization stats including ``snaps_synced``, ``snaps_deleted`` and ``snaps_renamed`` are reset
369370
on daemon restart and/or when a directory is reassigned to another mirror daemon (when
370371
multiple mirror daemons are deployed).
371372

372-
A directory can be in one of the following states::
373+
A directory can be in one of the following states:
373374

374-
- `idle`: The directory is currently not being synchronized
375-
- `syncing`: The directory is currently being synchronized
376-
- `failed`: The directory has hit upper limit of consecutive failures
375+
- ``idle``: The directory is currently not being synchronized.
376+
- ``syncing``: The directory is currently being synchronized.
377+
- ``failed``: The directory has hit upper limit of consecutive failures.
377378

378-
When a directory is currently being synchronized, the mirror daemon marks it as `syncing` and
379-
`fs mirror peer status` shows the snapshot being synchronized under the `current_syncing_snap`::
379+
When a directory is currently being synchronized, the mirror daemon marks it as ``syncing`` and
380+
``fs mirror peer status`` shows the snapshot being synchronized under the ``current_syncing_snap``::
380381

381382
$ ceph --admin-daemon /var/run/ceph/cephfs-mirror.asok fs mirror peer status cephfs@360 a2dc7784-e7a1-4723-b103-03ee8d8768f8
382383
{
@@ -399,14 +400,14 @@ When a directory is currently being synchronized, the mirror daemon marks it as
399400
}
400401
}
401402

402-
The mirror daemon marks it back to `idle`, when the syncing completes.
403+
The mirror daemon marks it back to ``idle``, when the syncing completes.
403404

404405
When a directory experiences a configured number of consecutive synchronization failures, the
405-
mirror daemon marks it as `failed`. Synchronization for these directories is retried.
406+
mirror daemon marks it as ``failed``. Synchronization for these directories is retried.
406407
By default, the number of consecutive failures before a directory is marked as failed
407-
is controlled by `cephfs_mirror_max_consecutive_failures_per_directory` configuration
408-
option (default: 10) and the retry interval for failed directories is controlled via
409-
`cephfs_mirror_retry_failed_directories_interval` configuration option (default: 60s).
408+
is controlled by ``cephfs_mirror_max_consecutive_failures_per_directory`` configuration
409+
option (default: ``10``) and the retry interval for failed directories is controlled via
410+
``cephfs_mirror_retry_failed_directories_interval`` configuration option (default: ``60`` seconds).
410411

411412
E.g., adding a regular file for synchronization would result in failed status::
412413

@@ -438,7 +439,7 @@ This allows a user to add a non-existent directory for synchronization. The mirr
438439
will mark such a directory as failed and retry (less frequently). When the directory is
439440
created, the mirror daemon will clear the failed state upon successful synchronization.
440441

441-
Adding a new snapshot or a new directory manually in the .snap directory of the
442+
Adding a new snapshot or a new directory manually in the ``.snap`` directory of the
442443
remote filesystem will result in failed status of the corresponding configured directory.
443444
In the remote filesystem::
444445

@@ -473,16 +474,16 @@ When the snapshot or the directory is removed from the remote filesystem, the mi
473474
clear the failed state upon successful synchronization of the pending snapshots, if any.
474475

475476
.. note:: Treat the remote filesystem as read-only. Nothing is inherently enforced by CephFS.
476-
But with the right mds caps, users would not be able to snapshot directories in the
477+
But with the right MDS caps, users would not be able to snapshot directories in the
477478
remote file system.
478479

479-
When mirroring is disabled, the respective `fs mirror status` command for the file system
480+
When mirroring is disabled, the respective ``fs mirror status`` command for the file system
480481
will not show up in command help.
481482

482483
Metrics
483484
-------
484485

485-
CephFS exports mirroring metrics as :ref:`Labeled Perf Counters` which will be consumed by the OCP/ODF Dashboard to provide monitoring of the Geo Replication. These metrics can be used to measure the progress of cephfs_mirror syncing and thus provide the monitoring capability. CephFS exports the following mirroring metrics, which are displayed using the ``counter dump`` command.
486+
CephFS exports mirroring metrics as :ref:`Labeled Perf Counters` which will be consumed by the OCP/ODF Dashboard to provide monitoring of the Geo Replication. These metrics can be used to measure the progress of cephfs-mirror syncing and thus provide the monitoring capability. CephFS exports the following mirroring metrics, which are displayed using the ``counter dump`` command.
486487

487488
.. list-table:: Mirror Status Metrics
488489
:widths: 25 25 75
@@ -539,7 +540,7 @@ CephFS exports mirroring metrics as :ref:`Labeled Perf Counters` which will be c
539540
- Gauge
540541
- The time duration of the last synchronization
541542
* - last_synced_bytes
542-
- counter
543+
- Counter
543544
- The total bytes being synchronized for the last synced snapshot
544545

545546
Configuration Options
@@ -561,7 +562,7 @@ Re-adding Peers
561562

562563
When re-adding (reassigning) a peer to a file system in another cluster, ensure that
563564
all mirror daemons have stopped synchronization to the peer. This can be checked
564-
via `fs mirror status` admin socket command (the `Peer UUID` should not show up
565+
via the ``fs mirror status`` admin socket command (the *Peer UUID* should not show up
565566
in the command output). Also, it is recommended to purge synchronized directories
566567
from the peer before re-adding it to another file system (especially those directories
567568
which might exist in the new primary file system). This is not required if re-adding

0 commit comments

Comments
 (0)