From 1b469dc0fa488a0bf96cfd47dcea8703b5518f8c Mon Sep 17 00:00:00 2001 From: Edward Hope-Morley Date: Thu, 12 Dec 2013 11:17:23 +0000 Subject: [PATCH] Adds configurable osd-journal-size option Fixes: bug 1259919 --- config.yaml | 11 +++++++++++ hooks/hooks.py | 3 ++- revision | 2 +- templates/ceph.conf | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/config.yaml b/config.yaml index d915cc1f..dfeae00b 100644 --- a/config.yaml +++ b/config.yaml @@ -17,6 +17,17 @@ options: no journal device will be used. . Only supported with ceph >= 0.48.3. + osd-journal-size: + type: int + default: 1024 + description: | + Ceph osd journal size. The journal size should be at least twice the + product of the expected drive speed multiplied by filestore max sync + interval. However, the most common practice is to partition the journal + drive (often an SSD), and mount it such that Ceph uses the entire + partition for the journal. + . + Only supported with ceph >= 0.48.3. osd-format: type: string default: xfs diff --git a/hooks/hooks.py b/hooks/hooks.py index 0176d651..7b536b8d 100755 --- a/hooks/hooks.py +++ b/hooks/hooks.py @@ -70,7 +70,8 @@ def emit_cephconf(): 'auth_supported': get_auth(), 'mon_hosts': ' '.join(mon_hosts), 'fsid': get_fsid(), - 'version': ceph.get_ceph_version() + 'version': ceph.get_ceph_version(), + 'osd_journal_size': config('osd-journal-size') } # Install ceph.conf as an alternative to support # co-existence with other charms that write this file diff --git a/revision b/revision index b1bd38b6..8351c193 100644 --- a/revision +++ b/revision @@ -1 +1 @@ -13 +14 diff --git a/templates/ceph.conf b/templates/ceph.conf index 887ba82f..107beece 100644 --- a/templates/ceph.conf +++ b/templates/ceph.conf @@ -18,6 +18,6 @@ [osd] keyring = /var/lib/ceph/osd/$cluster-$id/keyring - osd journal size = 1000 + osd journal size = {{ osd_journal_size }} filestore xattr use omap = true