From: Chris St. Pierre Date: Fri, 19 Feb 2016 21:06:12 +0000 (-0600) Subject: Add tunable to use object map for xattrs X-Git-Tag: v1.0.0~9^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F553%2Fhead;p=ceph-ansible.git Add tunable to use object map for xattrs Defaults to true if using ext4, false otherwise, and can be explicitly overridden if desired. --- diff --git a/group_vars/all.sample b/group_vars/all.sample index 9b6d4cdcb..7f2bb7f87 100644 --- a/group_vars/all.sample +++ b/group_vars/all.sample @@ -186,6 +186,13 @@ dummy: # Object backend #osd_objectstore: filestore +# xattrs. by default, 'filestore xattr use omap' is set to 'true' if +# 'osd_mkfs_type' is set to 'ext4'; otherwise it isn't set. This can +# be set to 'true' or 'false' to explicitly override those +# defaults. Leave it 'null' to use the default for your chosen mkfs +# type. +# filestore_xattr_use_omap: null + # Performance tuning #filestore_merge_threshold: 40 #filestore_split_multiple: 8 diff --git a/roles/ceph-common/defaults/main.yml b/roles/ceph-common/defaults/main.yml index ecaf45d59..df341e939 100644 --- a/roles/ceph-common/defaults/main.yml +++ b/roles/ceph-common/defaults/main.yml @@ -198,6 +198,13 @@ osd_crush_update_on_start: "true" # Object backend osd_objectstore: filestore +# xattrs. by default, 'filestore xattr use omap' is set to 'true' if +# 'osd_mkfs_type' is set to 'ext4'; otherwise it isn't set. This can +# be set to 'true' or 'false' to explicitly override those +# defaults. Leave it 'null' to use the default for your chosen mkfs +# type. +filestore_xattr_use_omap: null + # Performance tuning filestore_merge_threshold: 40 filestore_split_multiple: 8 diff --git a/roles/ceph-common/templates/ceph.conf.j2 b/roles/ceph-common/templates/ceph.conf.j2 index c348acff0..b0c148f06 100644 --- a/roles/ceph-common/templates/ceph.conf.j2 +++ b/roles/ceph-common/templates/ceph.conf.j2 @@ -114,6 +114,12 @@ filestore split multiple = {{ filestore_split_multiple }} osd op threads = {{ osd_op_threads }} filestore op threads = {{ filestore_op_threads }} filestore max sync interval = {{ filestore_max_sync_interval }} +{% if filestore_xattr_use_omap != None %} +filestore xattr use omap = {{ filestore_xattr_use_omap }} +{% elif osd_mkfs_type == "ext4" %} +filestore xattr use omap = true +{# else, default is false #} +{% endif %} osd max scrubs = {{ osd_max_scrubs }} {% if ceph_stable_release not in ['argonaut','bobtail','cuttlefish','dumpling','emperor','firefly','giant'] %} osd scrub begin hour = {{ osd_scrub_begin_hour }}