]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/rados: add prompts to stretch-mode.rst 49370/head
authorZac Dover <zac.dover@gmail.com>
Sat, 10 Dec 2022 04:15:45 +0000 (14:15 +1000)
committerZac Dover <zac.dover@gmail.com>
Sat, 10 Dec 2022 04:45:24 +0000 (14:45 +1000)
Add unselectable prompts to doc/rados/operations/stretch-mode.rst.

https://tracker.ceph.com/issues/57108

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit bafe76c20488006ced7d9a2f6b82a54540dd7a89)

doc/rados/operations/stretch-mode.rst

index eaeaa403f42d51a4e745b0b475c9042ba64c69dd..6b4c9ba8af641fcb7d683cabee1a5ecf839fd7c4 100644 (file)
@@ -65,15 +65,19 @@ just as susceptible to netsplit issues, but are much more tolerant of
 component availability outages than 2-site clusters are.
 
 To enter stretch mode, you must set the location of each monitor, matching
-your CRUSH map. For instance, to place ``mon.a`` in your first data center ::
+your CRUSH map. For instance, to place ``mon.a`` in your first data center:
 
-  $ ceph mon set_location a datacenter=site1
+.. prompt:: bash $
+
+   ceph mon set_location a datacenter=site1
 
 Next, generate a CRUSH rule which will place 2 copies in each data center. This
-will require editing the CRUSH map directly::
+will require editing the CRUSH map directly:
+
+.. prompt:: bash $
 
-  $ ceph osd getcrushmap > crush.map.bin
-  $ crushtool -d crush.map.bin -o crush.map.txt
+   ceph osd getcrushmap > crush.map.bin
+   crushtool -d crush.map.bin -o crush.map.txt
 
 Now edit the ``crush.map.txt`` file to add a new rule. Here
 there is only one other rule, so this is ID 1, but you may need
@@ -93,10 +97,12 @@ named ``site1`` and ``site2``::
           step emit
   }
 
-Finally, inject the CRUSH map to make the rule available to the cluster::
-  
-  $ crushtool -c crush.map.txt -o crush2.map.bin
-  $ ceph osd setcrushmap -i crush2.map.bin
+Finally, inject the CRUSH map to make the rule available to the cluster:
+
+.. prompt:: bash $
+
+   crushtool -c crush.map.txt -o crush2.map.bin
+   ceph osd setcrushmap -i crush2.map.bin
 
 If you aren't already running your monitors in connectivity mode, do so with
 the instructions in `Changing Monitor Elections`_.
@@ -104,9 +110,15 @@ the instructions in `Changing Monitor Elections`_.
 .. _Changing Monitor elections: ../change-mon-elections
 
 And lastly, tell the cluster to enter stretch mode. Here, ``mon.e`` is the
-tiebreaker and we are splitting across data centers ::
+tiebreaker and we are splitting across data centers. ``mon.e`` should be also
+set a datacenter, that will differ from ``site1`` and ``site2``. For this
+purpose you can create another datacenter bucket named ```site3`` in your
+CRUSH and place ``mon.e`` there:
+
+.. prompt:: bash $
 
-  $ ceph mon enable_stretch_mode e stretch_rule data center
+   ceph mon set_location e datacenter=site3
+   ceph mon enable_stretch_mode e stretch_rule datacenter
 
 When stretch mode is enabled, the OSDs wlll only take PGs active when
 they peer across data centers (or whatever other CRUSH bucket type
@@ -159,10 +171,12 @@ running with more than 2 full sites.
 
 Other commands
 ==============
-Starting in Pacific v16.2.8, if your tiebreaker monitor fails for some reason,
-you can replace it. Turn on a new monitor and run ::
+If your tiebreaker monitor fails for some reason, you can replace it. Turn on
+a new monitor and run:
 
-  $ ceph mon set_new_tiebreaker mon.<new_mon_name>
+.. prompt:: bash $
+
+   ceph mon set_new_tiebreaker mon.<new_mon_name>
 
 This command will protest if the new monitor is in the same location as existing
 non-tiebreaker monitors. This command WILL NOT remove the previous tiebreaker
@@ -177,9 +191,11 @@ bucket type you specified when running ``enable_stretch_mode``.
 
 When in stretch degraded mode, the cluster will go into "recovery" mode automatically
 when the disconnected data center comes back. If that doesn't work, or you want to
-enable recovery mode early, you can invoke ::
+enable recovery mode early, you can invoke:
+
+.. prompt:: bash $
 
-  $ ceph osd force_recovery_stretch_mode --yes-i-realy-mean-it
+   ceph osd force_recovery_stretch_mode --yes-i-really-mean-it
 
 But this command should not be necessary; it is included to deal with
 unanticipated situations.
@@ -188,9 +204,11 @@ When in recovery mode, the cluster should go back into normal stretch mode
 when the PGs are healthy. If this doesn't happen, or you want to force the
 cross-data-center peering early and are willing to risk data downtime (or have
 verified separately that all the PGs can peer, even if they aren't fully
-recovered), you can invoke ::
-  
-  $ ceph osd force_healthy_stretch_mode --yes-i-really-mean-it
+recovered), you can invoke:
+
+.. prompt:: bash $
+
+   ceph osd force_healthy_stretch_mode --yes-i-really-mean-it
 
 This command should not be necessary; it is included to deal with
 unanticipated situations. But you might wish to invoke it to remove