From 48c475d2b80fdf50c63308daa004441266ee8a4a Mon Sep 17 00:00:00 2001 From: Zac Dover Date: Sun, 16 Apr 2023 11:11:27 +0200 Subject: [PATCH] doc/dev: format command in cephfs-mirroring Correctly format a command in doc/dev/cephfs-mirroring/#creating-users. Reported by casanlin@init7.net at https://pad.ceph.com/p/Report_Documentation_Bugs Signed-off-by: Zac Dover (cherry picked from commit 408219bfca6b1e698229967e76d22d10028b7c20) --- doc/dev/cephfs-mirroring.rst | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/doc/dev/cephfs-mirroring.rst b/doc/dev/cephfs-mirroring.rst index 3ca487c0332cc..3379c96fa261e 100644 --- a/doc/dev/cephfs-mirroring.rst +++ b/doc/dev/cephfs-mirroring.rst @@ -2,38 +2,44 @@ CephFS Mirroring ================ -CephFS supports asynchronous replication of snapshots to a remote CephFS file system via -`cephfs-mirror` tool. Snapshots are synchronized by mirroring snapshot data followed by -creating a snapshot with the same name (for a given directory on the remote file system) as -the snapshot being synchronized. +CephFS supports asynchronous replication of snapshots to a remote CephFS file +system via `cephfs-mirror` tool. Snapshots are synchronized by mirroring +snapshot data followed by creating a snapshot with the same name (for a given +directory on the remote file system) as the snapshot being synchronized. Requirements ------------ -The primary (local) and secondary (remote) Ceph clusters version should be Pacific or later. +The primary (local) and secondary (remote) Ceph clusters version should be +Pacific or later. Key Idea -------- -For a given snapshot pair in a directory, `cephfs-mirror` daemon will rely on readdir diff -to identify changes in a directory tree. The diffs are applied to directory in the remote -file system thereby only synchronizing files that have changed between two snapshots. +For a given snapshot pair in a directory, `cephfs-mirror` daemon will rely on +readdir diff to identify changes in a directory tree. The diffs are applied to +directory in the remote file system thereby only synchronizing files that have +changed between two snapshots. This feature is tracked here: https://tracker.ceph.com/issues/47034. -Currently, snapshot data is synchronized by bulk copying to the remote filesystem. +Currently, snapshot data is synchronized by bulk copying to the remote +filesystem. -.. note:: Synchronizing hardlinks is not supported -- hardlinked files get synchronized - as separate files. +.. note:: Synchronizing hardlinks is not supported -- hardlinked files get + synchronized as separate files. Creating Users -------------- -Start by creating a user (on the primary/local cluster) for the mirror daemon. This user -requires write capability on the metadata pool to create RADOS objects (index objects) -for watch/notify operation and read capability on the data pool(s). +Start by creating a user (on the primary/local cluster) for the mirror daemon. +This user requires write capability on the metadata pool to create RADOS +objects (index objects) for watch/notify operation and read capability on the +data pool(s). - $ 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' +.. prompt:: bash $ + + 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' Create a user for each file system peer (on the secondary/remote cluster). This user needs to have full capabilities on the MDS (to take snapshots) and the OSDs:: -- 2.39.5