]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/rados: update "stretch mode" 54756/head
authorPC-Admin <perthserverplus@gmail.com>
Tue, 28 Nov 2023 09:45:52 +0000 (17:45 +0800)
committerZac Dover <zac.dover@proton.me>
Sun, 3 Dec 2023 06:13:35 +0000 (07:13 +0100)
Update stretch mode docs, min_size and max_size are no longer defined in
the CRUSH map and the example rule given will fail to compile.

Specify that the tiebreaker data centre cannot be defined in CRUSH as
this produces an error.

Signed-off-by: Michael Collins <perthserverplus@gmail.com>
(cherry picked from commit 28551b41f878e7ad8f43e85bcbc8c9f64c07346c)

doc/rados/operations/stretch-mode.rst

index f797b5b91f4cb71eee3264429ab22382c6243397..4adf60e46f6dd213b7828aaf89d2bb66dfd22a9b 100644 (file)
@@ -121,8 +121,6 @@ your CRUSH map. This procedure shows how to do this.
 
       rule stretch_rule {
              id 1
-             min_size 1
-             max_size 10
              type replicated
              step take site1
              step chooseleaf firstn 2 type host
@@ -141,17 +139,36 @@ your CRUSH map. This procedure shows how to do this.
 
 #. Run the monitors in connectivity mode. See `Changing Monitor Elections`_.
 
+   .. prompt:: bash $
+
+      ceph mon set election_strategy connectivity
+
 #. Command the cluster to enter stretch mode. In this example, ``mon.e`` is the
    tiebreaker monitor and we are splitting across data centers. The tiebreaker
    monitor must be assigned a data center that is neither ``site1`` nor
-   ``site2``. For this purpose you can create another data-center bucket named
-   ``site3`` in your CRUSH and place ``mon.e`` there:
+   ``site2``. This data center **should not** be defined in your CRUSH map, here 
+   we are placing ``mon.e`` in a virtual data center called ``site3``:
 
    .. prompt:: bash $
 
       ceph mon set_location e datacenter=site3
       ceph mon enable_stretch_mode e stretch_rule datacenter
 
+#. Set the replication levels for each pool. Here we are setting the standard
+   replication levels for a stretch mode cluster. Where ``4`` copies will be kept
+   in total, with a minimum of ``2`` in each data center:
+
+   .. prompt:: bash $
+
+      ceph osd pool set ceph_data min_size 2
+      set pool 2 min_size to 2
+      ceph osd pool set ceph_data size 4
+      set pool 2 size to 4
+      ceph osd pool set ceph_metadata min_size 2
+      set pool 3 min_size to 2
+      ceph osd pool set ceph_metadata size 4
+      set pool 3 size to 4
+
 When stretch mode is enabled, PGs will become active only when they peer
 across data centers (or across whichever CRUSH bucket type was specified),
 assuming both are alive. Pools will increase in size from the default ``3`` to