From 567c0bb6ce69ec54fc5cd8de6a8292c3003604a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 1 May 2014 01:24:20 +0200 Subject: [PATCH] Enable single host mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit introduces a new config option 'osd crush chooseleaf type'. With the help of this option and by setting it to '0' we tell Ceph to store all the replicas on a single host. Basically we tell CRUSH to iterate over disk and not over host. Signed-off-by: Sébastien Han --- group_vars/all | 5 +++++ roles/common/templates/ceph.conf.j2 | 3 +++ 2 files changed, 8 insertions(+) diff --git a/group_vars/all b/group_vars/all index c6d67dfb9..ab7ec7b17 100644 --- a/group_vars/all +++ b/group_vars/all @@ -48,3 +48,8 @@ osd_op_threads: 8 osd_recovery_max_active: 5 osd_max_backfills: 2 osd_recovery_op_priority: 2 + + +## Testing mode +# enable this mode _only_ when you have a single node +common_single_host_mode: true diff --git a/roles/common/templates/ceph.conf.j2 b/roles/common/templates/ceph.conf.j2 index 4eb2cf80d..3f579fea8 100644 --- a/roles/common/templates/ceph.conf.j2 +++ b/roles/common/templates/ceph.conf.j2 @@ -27,6 +27,9 @@ {% if pool_default_crush_rule is defined %} osd pool default crush rule = {{ pool_default_crush_rule }} {% endif %} +{% if common_single_host_mode is defined %} + osd crush chooseleaf type = 0 +{% endif %} [mon] mon osd down out interval = {{ mon_osd_down_out_interval }}