Skip to content

Commit 3110011

Browse files
committed
doc/dev/cephfs-mirroring: edit file 1 of x
Add prompts (and perform necessary corrections to glaring grammatical errors) to doc/dev/cephfs-mirroring.rst, as requested by Jos Collin in https://github.com/ceph/ceph/pull/63237/files#r2085886075. This commit edits the first quarter of the doc/dev/cephfs-mirroring.rst file. This commit encompasses about one-hundred lines of RST. Signed-off-by: Zac Dover <[email protected]> (cherry picked from commit e9a2705)
1 parent 7248859 commit 3110011

File tree

1 file changed

+39
-28
lines changed

1 file changed

+39
-28
lines changed

doc/dev/cephfs-mirroring.rst

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Key Idea
1717
--------
1818

1919
For a given snapshot pair in a directory, `cephfs-mirror` daemon will rely on
20-
`CephFS Snapdiff Feature` to identify changes in a directory tree. The diffs are applied to
21-
directory in the remote file system thereby only synchronizing files that have
22-
changed between two snapshots.
20+
`CephFS Snapdiff Feature` to identify changes in a directory tree. The diffs
21+
are applied to directory in the remote file system thereby only synchronizing
22+
files that have changed between two snapshots.
2323

2424
Currently, snapshot data is synchronized by bulk copying to the remote
2525
filesystem.
@@ -39,59 +39,70 @@ data pool(s).
3939

4040
ceph auth get-or-create client.mirror mon 'profile cephfs-mirror' mds 'allow r' osd 'allow rw tag cephfs metadata=*, allow r tag cephfs data=*' mgr 'allow r'
4141

42-
Create a user for each file system peer (on the secondary/remote cluster). This user needs
43-
to have full capabilities on the MDS (to take snapshots) and the OSDs::
42+
Create a user for each file system peer (on the secondary/remote cluster).
43+
This user needs to have full capabilities on the MDS (to take snapshots) and
44+
the OSDs:
4445

45-
$ ceph fs authorize <fs_name> client.mirror_remote / rwps
46+
.. prompt:: bash $
47+
48+
ceph fs authorize <fs_name> client.mirror_remote / rwps
4649

4750
This user should be used (as part of peer specification) when adding a peer.
4851

4952
Starting Mirror Daemon
5053
----------------------
5154

52-
Mirror daemon should be spawned using `systemctl(1)` unit files::
55+
Spawn a mirror daemon by using `systemctl(1)` unit files:
5356

54-
$ systemctl enable cephfs-mirror@mirror
55-
$ systemctl start cephfs-mirror@mirror
57+
.. prompt:: bash $
5658

57-
`cephfs-mirror` daemon can be run in foreground using::
59+
systemctl enable cephfs-mirror@mirror
60+
systemctl start cephfs-mirror@mirror
5861

59-
$ cephfs-mirror --id mirror --cluster site-a -f
62+
Run the `cephfs-mirror` daemon in the foreground by running the following
63+
command with the ``-f`` option:
6064

61-
.. note:: User used here is `mirror` as created in the `Creating Users` section.
65+
.. prompt:: bash $
66+
67+
cephfs-mirror --id mirror --cluster site-a -f
68+
69+
.. note:: The user specified here is ``mirror``, as created in the `Creating
70+
Users` section.
6271

6372
Mirroring Design
6473
----------------
6574

66-
CephFS supports asynchronous replication of snapshots to a remote CephFS file system
67-
via `cephfs-mirror` tool. For a given directory, snapshots are synchronized by transferring
68-
snapshot data to the remote file system and creating a snapshot with the same name as the
69-
snapshot being synchronized.
75+
CephFS supports asynchronous replication of snapshots to a remote CephFS file
76+
system via the `cephfs-mirror` tool. For a given directory, snapshots are
77+
synchronized by transferring snapshot data to the remote file system and
78+
by creating a snapshot with the same name as the snapshot being synchronized.
7079

7180
Snapshot Synchronization Order
7281
------------------------------
7382

74-
Although the order in which snapshots get chosen for synchronization does not matter,
75-
snapshots are picked based on creation order (using snap-id).
83+
Although the order in which snapshots get chosen for synchronization does not
84+
matter, snapshots are picked based on creation order (using snap-id).
7685

7786
Snapshot Incarnation
7887
--------------------
7988

80-
A snapshot may be deleted and recreated (with the same name) with different contents.
81-
An "old" snapshot could have been synchronized (earlier) and the recreation of the
82-
snapshot could have been done when mirroring was disabled. Using snapshot names to
83-
infer the point-of-continuation would result in the "new" snapshot (incarnation)
84-
never getting picked up for synchronization.
89+
A snapshot may be deleted and recreated (with the same name) with different
90+
contents. An "old" snapshot could have been synchronized (earlier) and the
91+
recreation of the snapshot could have been done when mirroring was disabled.
92+
Using snapshot names to infer the point-of-continuation would result in the
93+
"new" snapshot (incarnation) never getting picked up for synchronization.
8594

86-
Snapshots on the secondary file system stores the snap-id of the snapshot it was
87-
synchronized from. This metadata is stored in `SnapInfo` structure on the MDS.
95+
Snapshots on the secondary file system stores the snap-id of the snapshot it
96+
was synchronized from. This metadata is stored in `SnapInfo` structure on the
97+
MDS.
8898

8999
Interfaces
90100
----------
91101

92-
`Mirroring` module (manager plugin) provides interfaces for managing directory snapshot
93-
mirroring. Manager interfaces are (mostly) wrappers around monitor commands for managing
94-
file system mirroring and is the recommended control interface.
102+
The `mirroring` module (a Manager plugin) provides interfaces for managing
103+
directory snapshot mirroring. Manager interfaces are (mostly) wrappers around
104+
monitor commands for managing file system mirroring and are the recommended
105+
control interface.
95106

96107
Mirroring Module and Interface
97108
------------------------------

0 commit comments

Comments
 (0)