From dcf8c597c549b5e5ce8e4174e8c1bc2d987a7f03 Mon Sep 17 00:00:00 2001 From: lafont Date: Thu, 14 May 2015 02:01:01 +0200 Subject: [PATCH] Doc: add a note about a CRUSH corner case with `ceph osd out` MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: François Lafont --- doc/rados/operations/add-or-rm-osds.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/rados/operations/add-or-rm-osds.rst b/doc/rados/operations/add-or-rm-osds.rst index bfb9ff71043ea..76b043e25fe7e 100644 --- a/doc/rados/operations/add-or-rm-osds.rst +++ b/doc/rados/operations/add-or-rm-osds.rst @@ -244,6 +244,27 @@ You should see the placement group states change from ``active+clean`` to ``active, some degraded objects``, and finally ``active+clean`` when migration completes. (Control-c to exit.) +.. note:: Sometimes, typically in a "small" cluster with few hosts (for + instance with a small testing cluster), the fact to take ``out`` the + OSD can spawn a CRUSH corner case where some PGs remain stuck in the + ``active+remapped`` state. If you are in this case, you should mark + the OSD ``in`` with: + + ``ceph osd in {osd-num}`` + + to come back to the initial state and then, instead of marking ``out`` + the OSD, set its weight to 0 with: + + ``ceph osd crush reweight osd.{osd-num} 0`` + + After that, you can observe the data migration which should come to its + end. The difference between marking ``out`` the OSD and reweighting it + to 0 is that in the first case the weight of the bucket which contains + the OSD isn't changed whereas in the second case the weight of the bucket + is updated (and decreased of the OSD weight). The reweight command could + be sometimes favoured in the case of a "small" cluster. + + Stopping the OSD ---------------- -- 2.39.5